How to convert String to Number in java program?

The valueOf() function of Integer class is is used to convert string to Number. Here is the code example:

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