How to convert string to int in java?



How to convert string to int in java?..

Answer / hrindows@gmail.com

"class Scratch{
public static void main(String[] args){
String str = ""50"";
System.out.println( Integer.parseInt( str )); // Integer.parseInt()
}
}"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Can we overload the constructors?

0 Answers  


What is the declaration statement?

0 Answers  


Define jit compiler?

0 Answers  


Can a class be subclass of itself?

4 Answers  


Is void a wrapper class?

0 Answers  






How to split a string in java?

0 Answers  


What is the basically use of finally while we know it is always executed but why?

5 Answers   Oracle, TCS,


What is the purpose of the strictfp keyword?

0 Answers  


What are white spaces in java?

0 Answers  


difference between arraylist and linkedlist otherthan performance

2 Answers   L&T,


Difference between string, stringbuffer and stringbuilder?

0 Answers  


Can a class have a static inner class?

0 Answers  


Categories