Answer Posted / vikki
using parseInt() method for example
//String to primitive types
int iVal = Integer.parseInt(str);
long lVal = Long.parseLong(str);
float fVal = Float.parseFloat(str);
double dVal = Double.parseDouble(str);
Is This Answer Correct ? | 32 Yes | 5 No |
Post New Answer View All Answers
What are encapsulation, inheritance and polymorphism?
What are different type of exceptions in java?
How to create a fecelet view?
What are the different types of garbage collectors in java?
who can i handle multiple client in RMI
Can we override constructors?
How does arraylist size increase in java?
Is 0 a prime number?
What is finalize()?
Why hashcode is used in java?
When should the method invokelater() be used?
what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread
Which collection is ordered in java?
How do you include a string in java?
How can we find the actual size of an object on the heap?