title: <identifier> expected when creating an array?
body: <p>I am writing an airline program that will allow the user to input names and meal choice for each seating section economy, business, and first. I am trying to save all the names and meals into an array. but I am getting a syntax error. </p>
  
  <p>I get  expected message when I implement my flyer array.</p>
  
  <p>I have looked on stack overflow. From what I can tell it should be ok to initialize my array this way.</p>
  
  <p>Thanks for any help.</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.List;
  import java.util.Scanner;
  
  public class Flyers 
  {    
      public Flyers()
      {
  
      }
  
      public List&lt;String&gt; seat = new ArrayList&lt;&gt;();
      int numberOfFlyers;
      int numberOfMeals;
      String name;
      String meal;    
  
      String[][] flyer;
  
      public void addEconomyFlyer()
      {
          Scanner in = new Scanner(System.in);
          System.out.print("Enter number of economy seats sold: ");
          numberOfFlyers = in.nextInt();
  
          flyer = new [numberOfFlyers][numberOfFlyers];
      }  
  }
  </code></pre>