My program will provide information on buildings, which is stored in an online Oracle database. I got it to ask the user to enter the building number and then run and display the results of several queries.
Here is what I got so far:
String userbnumber = null;
try {
BufferedReader obj = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Please enter the building number: ");
userbnumber = obj.readLine();
} catch (IOException e) {
}
// A Lot of queries which use userbnumber as the basis for getting data from tables
However, what I can’t figure out is how /where to use the do-while clause to keep asking for the building number until the user enters 0 at which point the program would print “Thank you for your time” and stop.
Any help would be greatly appreciated.
better way is to