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 is filters and its use?

2 Answers   Virtusa,


What is the purpose of garbage collection in java?

0 Answers  


What is the difference between stored procedure & function?

0 Answers  


Does treeset use compareto?

0 Answers  


What is a line separator in java?

0 Answers  






What is multiple inheritance & can we implement it in java?

6 Answers   Satyam,


What data type is a string?

0 Answers  


What is a super method?

0 Answers  


What are the two categories of data types in the java programming language?

0 Answers  


What is a boolean structure?

0 Answers  


What are the new features in java 8? Explain

0 Answers  


why java is platform independent?

5 Answers   IBM, SparkTG,


Categories