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
How does class forname work in java?
What does the exclamation mark mean in java?
What is <> used for in java?
Is main a keyword in java?
How are observer and observable used in java programming?
Why is string class considered immutable?
What an i/o filter?
what is comparable and comparator interface?
Describe the process as to how substring() methodology mechanisms in java.
What is the difference between static and global variables and also define what are volatile variables?
This abstract class is correct ? abstract class A { public abstract void Disp(); public abstract void B() { } public absract virtual C() { } }
What is static data type in java?
What Is Query Throttling in java?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
What is derived datatype?