title: How to go back to a specific line in Java?
body: <p>I'm writing code that involves an if-else statement asking the user if they want to continue. I have no idea how to do this in Java. Is there like a label I can use for this?</p>
  
  <p>This is kind of what I'm looking for:</p>
  
  <pre><code>--label of some sort--
  System.out.println("Do you want to continue? Y/N");
  if (answer=='Y')
  {
      goto suchandsuch;
  }
  else
  {
      System.out.println("Goodbye!");
  }
  </code></pre>
  
  <p>Can anybody help?</p>