Home > DeveloperSection > Interviews > How to convert String to Number in java program?

Posted on    May-07-2011 12:57 AM

 Java Java 
Ratings:
 1 Answer(s)
  1169  View(s)
Rate this:

Amit Singh

Total Post:565

Points:2825
Posted on    May-07-2011 12:00 AM

The valueOf() function of Integer class is is used to convert string to Number.

Example:

String numString = “1000″;
int id=Integer.valueOf(numString).intValue();


Don't want to miss updates? Please click the below button!

Follow MindStick