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 a null check?
Difference between nested and inner classes ?
What are the topics in core java?
What are new features introduced with java 8 ?
What is the relationship between class and object?
Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).
Why java is a platform independent? Explain
What is the += operator called?
Highest level event class of the event-delegation model?
Can we declare an array without size in java?
What is methods and methodology?
Is empty in java?
How use .contains in java?
define polymorphism in java
What is a finally block? Is there a case when finally will not execute?