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

What is the do while loop syntax?

530


Why singleton class is used in java?

539


Give an example of call be reference significance.

580


What are the rules for variable declaration?

486


How do I enable java in safari?

520






Why arraylist is used in java?

526


What is multiple inheritance? Is it supported by java?

499


Write a java program to find the route that connects between Red and Green Cells. General Rules for traversal 1. You can traverse from one cell to another vertically, horizontally or diagonally. 2. You cannot traverse through Black cells. 3. There should be only one Red and Green cell and at least one of each should be present. Otherwise the array is invalid. 4. You cannot revisit a cell that you have already traversed. 5. The maze need not be in the same as given in the above example

2111


What is array sorting in java?

524


Can constructor be static or final?

627


What is the main use of generics in java?

493


Tell me are there implementations for sorting and searching in the java libarary?

574


What is the difference between a window and a frame in java programming?

558


what is synchronization? : Java thread

537


How are this() and super() used with constructors in java programming?

540