title: Do-while question java
body: <p>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. </p>
  
  <p>Here is what I got so far:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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.</p>
  
  <p>Any help would be greatly appreciated.</p>