I want to build a program that only stops scanning for strings until after I input "0" in the console, how do I do that?
I assume I can use do while loop, but I don't know what to put in the while() condition.
Scanner scan = new Scanner(System.in);
do {
String line = scan.nextLine();
//do stuff
} while(); //what do i put in here to stop scanning after i input "0"
Thanks in advance, I'm new to Java and OOP in general.