You're quite welcome, but please, keep your kisses to yourself.
Also, do you see the problem with declaring and initializing the i variable *inside* of the while loop?
Type: Posts; User: curmudgeon
You're quite welcome, but please, keep your kisses to yourself.
Also, do you see the problem with declaring and initializing the i variable *inside* of the while loop?
Your code would never work. You're getting the second item in the list by calling get(1) (remember lists are 0-based -- they start at 0), before a 2nd item has been added.
Why won't my suggestion...
Your int variable i confuses me as you create it, initialize it, but never use it. You also create it inside of the loop, so it can't be used as an index variable if that was your purpose. You also...