title: How to fix my if/else statement Java
body: <p>I am pretty new to the java language and tried to run a simple text based program where once you push 1 or 0 it will either continue the story or stop it. What I can't figure out is if I run this portion of code below and I select the wrong answer it bypasses my if statement.</p>
  
  <pre><code>    package game;
  import java.util.Scanner;
  class chase {
  public static void main (String args[]){
  
      int answer1;
      answer1 = 1;
  
      Scanner chase = new Scanner(System.in);
  
      System.out.println("You hear a noise form a house you walk by. What do you     do?");
      System.out.println("Press 1 to enter the house. Press 0 to run away like a panzy");
  
      chase.nextLine();
  
      if (answer1 == 1){
          System.out.println("Good Choice!");
          }else{
          System.out.println("You ran away and was crushed by a falling pig");
          System.out.println("Try again!");
      }
  
      }
  
  }
  </code></pre>
  
  <p>What I tried to do was once you push 1 it says "Good Choice!" and once you push 0 it runs the else statement. But every time I push 0 it says "Good Choice!"</p>
  
  <p>I don't know what I did wrong. 
  Please help.</p>