boolean done = false;while (!done){ Print prompt String input = read input; if (end of input indicated) done = true; else { // Process input } }