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
Can we override singleton class?
Why are lists ordered in java?
What is proper subset?
This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }
What is collection class in java? List down its methods and interfaces.
What are autoboxing and unboxing? When does it occur?
Name some OOPS Concepts in Java?
In a class implementing an interface, can we change the value of any variable defined in the interface?
Can we serialize arraylist in java?
In the below example, what will be the output?
What is append function?
What are the main features of java?
What does nextint () do in java?
What is difference between an object and a class?
What is a constructor overloading in java?