Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    18
    Views
    2,317

    Re: Need some help with substring please

    If counter has a value of 11, counter+1 will be 12

    Add a println to print out the value of counter inside the loop to see what its value is. Be sure to print it out every time its value is changed.
  2. Replies
    18
    Views
    2,317

    Re: Need some help with substring please

    Does the code use the value of counter only? It looks like it adds to it (+1)
  3. Replies
    18
    Views
    2,317

    Re: Need some help with substring please

    Remember that indexes are 0 based. The max allowed value is the length-1
    The max index for 12 chars is 11
  4. Replies
    18
    Views
    2,317

    Re: Need some help with substring please

    A char literal is inside 's not "s
  5. Replies
    18
    Views
    2,317

    Re: Need some help with substring please

    Look at the String class API doc. It has methods for finding the index values (location of) for short strings in a longer String. You could use that repeatedly to find the third comma.

    Or you...
Results 1 to 5 of 5