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

What are the two types of java programming?

0 Answers  


Is there any need to import java.lang package?

13 Answers   Sun Microsystems,


What is split return?

0 Answers  


How do you control extraneous variables?

0 Answers  


what is the default value of a variable char?(If not assigned)

4 Answers  






What are the uses of synchronized keyword?

0 Answers  


Explain the difference between an Interface and an Abstract class?

0 Answers   BirlaSoft,


Java is based on pass by reference or pass by value ..

6 Answers   L&T, Wipro,


What releases of Java technology are currently available? What do they contain?

1 Answers  


what is function overloading in java?

0 Answers   Tavant Technologies, TCS, Virtusa,


Write a program in java to establish a connection between client and server?

0 Answers  


Can java object be locked down for exclusive use by a given thread?

0 Answers  


Categories