public class MainClass {
public static void main(String[] argv) {
Boolean wrappedBoolean = new Boolean("True");
try {
Byte wrappedByte = new Byte("41");
Short wrappedShort = new Short("31313");
Integer wrappedInt = new Integer("12345678");
Long wrappedLong = new Long("12345678987654321");
Float wrappedFloat = new Float("1.11f");
Double wrappedDouble = new Double("1.11111111");
} catch (NumberFormatException e) {
System.out.println("Bad Number Format");
}
}
}
|