Use a while loop:
while (true) {
....
}
Keep reading input from the keyboard. When, for example, you enter "quit", exit from the loop using the "break" command. Else convert that input into a number and add it to the list.
String input;
while (true) {
// read input
if ("quit".equals(input)) {
break;
}
// convert it into a number and add it to the list
}