I\'ve been trying to print the output in two separate lines, I used System.out.println()
and also System.out.println(\"\\n\")
but I only seem to be get
If i understand your question correctly, may be this is what you need
public void readFromTerminal() {
System.out
.println("Read lines, please enter some other character to stop.");
int check = 0;
while (true) {
check = input.nextInt();
al.add(check);
if (check == 0) {
break;
}
}
for (int i : al) {
System.out.print(i+ "\n");
}
}