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

Why can't you declare a class as protected?

0 Answers  


What is get () in java?

0 Answers  


What is the purpose of void class?

0 Answers  


Why declare Main() method as a static in java ?

0 Answers   HCL,


what is the difference between statis block and static variable

7 Answers  


how can i use a nonsynchronized hashtable?

0 Answers   CoreObjects,


what are abstract functions?

0 Answers  


How do generics work?

0 Answers  


Why singleton pattern is better than creating singleton class with static instance?

0 Answers  


What is a Java Virtual Machine?

1 Answers  


What are white spaces in java?

0 Answers  


What is the default modifier in Interface?

5 Answers  


Categories