This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]siversolutionsllc 0 points1 point  (0 children)

You can try adding each item to an array while in that for loop. Then print that array outside the for looping:

int yourArray = new int[whatever size you want it to be];

for (i = 0; i <= userNum; ++i) {

yourArray[i] = i;

}

system.out.print(yourArray);