Originally posted by Campbell Ritchie: Hardly a beginner's topic! No, it is not the right way to do it. If you take the value of a char, you might get 'A' = 0x41 (65). You could try several things: Integer.parseInt(myString.substring( . . . Character#getNumericValuecharAt() - '0'and there are bound to be others.At least the parsing methods will throw a nice Exception if your char isn't a number!
Originally posted by Avi Sridhar: Thanks for the reply. Reg. this : Integer.parseInt(myString.substring( . . . did you mean