jherald
Originally posted by Jherald Lacambra:
Integer.parseInt will throw an exception if the value pass is a string that is alphanumeric/alpha only or it has decimal point e.g.(1.0,1.1)
Originally posted by shuini gustav:
The values in the String I am trying to convert are only
1,2,3,etc and other single digit numbers
jherald
jherald
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
' ' is a character(ascii value 0x20) and " " is a string with a character in it
[My Blog]
All roads lead to JavaRanch
still throws the same exception
String octVal = "81"; //Octal
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |