You need to test that the value of the arg to charAt() is not past the end of the String before you use it:
(psg.charAt(i)) <= 57) && (i < psg.length())
Here you use it BEFORE you test it.
Swap...
Type: Posts; User: Norm
You need to test that the value of the arg to charAt() is not past the end of the String before you use it:
(psg.charAt(i)) <= 57) && (i < psg.length())
Here you use it BEFORE you test it.
Swap...
You need to test that the value of the arg to charAt() is not past the end of the String before you use it:
(psg.charAt(i)) <= 57) && (i < psg.length())
Here you use it BEFORE you test it.
Swap...