I've created a do while loop that does insert items into an array list like I want it to but the problem is the output to console. I want the user to enter items into an array so I have a prompt like so:
As you notice it does not print Enter a[2]: to the correct part of the screen, it's like it skips the second iteration to print the prompt yet it still stores to in array[2]. Here is my code:
As you notice it does not print Enter a[2]: to the correct part of the screen, it's like it skips the second iteration to print the prompt yet it still stores to in array[2]. Here is my code: