title: Why is my program not stopping?
body: <pre><code>import java.util.Scanner;
  
  public class StudySession {
  public static void main(String[] args) {
      Scanner in = new Scanner(System.in);
  
      String inData;
      int age;
      System.out.println("Enter your age");
      while(true) {
      inData = in.nextLine();
      if(inData == "STOP") {
          System.out.println("Terminated");
          break;
      }
      age = Integer.parseInt(inData);
  
  
  
      if(age &lt; 5) {
          System.out.println("Under 5's rate.");
      }
      if(age &gt;= 60) {
          System.out.println("Senior citizen rate.");
      }
  
      if(age &lt;= 17) {
          System.out.println("Child rate.");
      }
      if(age &gt; 17 &amp;&amp; age &lt; 65) {
          System.out.println("Adult rate.");
      }
      System.out.println("Enjoy the show!"); //This prints no matter what.
  
     }
   }
  }
  </code></pre>
  
  <p>I want the program to stop when the user types "STOP". Why is it not working? You don't have to give me a straight up answer. A clue will do. Perhaps it's something to do with the order of my statements?</p>