title: Jumping to lines in Java
body: <p>I have just now started learning Java and one of the differences I noticed from C++ and VB is that Java has no goto statements, which I tend to use a lot while programming. </p>
  
  <p>Is there any way I could jump between lines using another statement? I tried to use break and continue but to no avail (I might be doing something wrong).</p>
  
  <p>Here is the code with goto statements and how I want it to operate:</p>
  
  <pre><code>public class HelloWorld {
  
  static Scanner sc = new Scanner(System.in);
  public static void main(String[] args)
  {
      jump1:
      System.out.print("What do you want to calculate? ");
      String method = sc.nextLine();
      if (method.equals("tax")) tax();
      else {
          System.out.print("Please input a valid method. \n\n");
          goto jump1;
      }  
  }
  </code></pre>
  
  <p>What is a good replacement for the goto commands?</p>