title: why does my scanner(system.in) run twice
body: <p>I am new to java, been self teaching for the last week. I cannot find the reason why the if else statement runs twice. here is the whole code, I know is simple but still trying to learn.</p>
  
  <pre><code>package tickets;
  
  import java.util.Scanner;
  
  
  public class tickets {
  public static void main(String[] args) {
  //program designed to ask how many visitors
  //are in a party of people and work out
  //the total cost of the entry tickets.
      double adult = 12.50;
      double consession = 9.90;
      double child = 6.25;
      double percentage = 0.80;
  
  System.out.println("please enter the amount of adults");
  Scanner adult1 = new Scanner (System.in);
  
  //adding code that would give a percentage discount for 
  //4 adults or more
  {   
  if ( adult1.nextInt() &gt;= 4
  {
  double adult2 =( adult1.nextInt() * percentage);
              }else {
  double adult2 = (adult * adult1.nextInt());
  
  
  
  System.out.println("please enter the amount of consessions");       
      Scanner consession1 = new Scanner (System.in);
              double consession2 = (consession *consession1.nextInt());
  
      System.out.println("please enter the amount of children");
      Scanner child1 = new Scanner (System.in);
              double child2 = (child * child1.nextInt()); 
  
      System.out.println( "total"+" " + (adult2 +consession2 + child2) ); 
      System.out.println("hope you enjoy your visit today!");
      //woop woop it works!!!!!!!!!!
          }
  
      }
  }
  </code></pre>
  
  <p>}</p>