This Java tip illustrates a method of converting a string to a number. This tip is very useful for developer who are expecting a number as a input but recieve the number in a string format. Developers may use this code to convert the retrieved string into number format.

 byte b = Byte.parseByte("123");
    short s = Short.parseShort("123");
    int i = Integer.parseInt("123");
    long l = Long.parseLong("123");
    float f = Float.parseFloat("123.4");
    double d = Double.parseDouble("123.4e10");