Convert char to int
Posted on 2004-11-13
This seems very simple, but help!
private static boolean GetVaildNumber(char number,String type) throws Exception
//convert char number to int
int mynumber=(new Integer(number)).intValue();
System.out.println("mynumber:" + mynumber);
when the new number is printed, for example a 5 comes out 53, a 7 is 55...etc....the decimal value on the asciii table...I want the number to be an int! 5 =5 and all!