title: Compare user input with integer
body: <p>I'm making a program where it asks the user a simple math question and it has to tell them whether they are correct or incorrect. I'm getting errors </p>
  
  <pre><code>package exercises;
  
  import java.util.Scanner;
  public class Exercises {
  
  
      public static void main(String[] args) {
          Scanner user_input = new Scanner (System.in);
          String number;
          System.out.println("Consider the following equation: 5x - 10");
          System.out.println("Solve for x.")
          number = user_input.next();
  
          if (number == 2);{
              System.out.println("Correct.");
  
          }else{
              System.out.println("Incorrect. The answer is 2.");
          }
  
  }
  </code></pre>