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 is the difference between class & object?
Which class is the superclass for all the classes?
Can we override final method?
What about method local inner classes or local inner classes in java?
Is empty set an element of empty set?
What is a numeric format?
What are adapter classes?
Which method returns the length of a string?
How java uses the string and stringbuffer classes?
What is keyword and identifier?
What is a treemap in java?
What is string pool in java?
Explain a situation where finally block will not be executed?
What is function overriding and overloading in java?
How is final different from finally and finalize?