title: How to implement continuous String loop
body: <p>I'm new to Java, got stuck with the following:</p>
  
  <blockquote>
    <p>Create a program that will output to console your names and where you are from. Make your program ask the user for this information.
    <strong>Advanced Assignment:</strong> Change the program so that it runs in a continuous loop, asking the user for name and where they are from, and
    outputting to the console. If the user types in "X" for either the
    name or where they are from, terminate the loop.</p>
  </blockquote>
  
  <p>I implemented the first part, but having trouble with advanced assignment. Can anyone please give me a hint, thank you!</p>
  
  <pre><code>import java.util.Scanner;
  
  public class MainClass {
      public static void main(String[] args) {
          Scanner myScan = new Scanner(System.in);
          System.out.println("Enter your name");
          String myName = myScan.next();
          System.out.println("Enter your location");
          String myLocation = myScan.next();
          System.out.println("Your name is "+ myName + " and your location is " + myLocation);
      }
  }
  </code></pre>