How to convert string to int in java?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is string builder not thread safe?

706


what is the significance of listiterator in java?

702


What is == and === in javascript?

654


Explain notifyall() method of object class ?

757


What is a void in java?

667






Is it possible to use string in the switch case?

629


How can you write a loop indefinitely in java programming?

644


What is thread synchronization in java?

572


What is a boolean used for?

699


What is connection class in java?

594


What is an object’s lock and which object’s have locks?

580


Can main() method in java can return any data?

771


What is the difference between actual and formal parameters?

593


Explain about join() method?

639


Explain importance of inheritance in java?

684