Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    3
    Views
    1,849

    [SOLVED] Re: StringIndexOutOfBoundsException

    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...
  2. Replies
    3
    Views
    1,849

    [SOLVED] Re: StringIndexOutOfBoundsException

    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...
Results 1 to 2 of 2