title: creating multiple objects in java oop
body: <p>i cant just get my head around this.
  i've got a user class:</p>
  
  <pre><code>public class user {
  
  private String name;
  private int age;
  
  public user()
  {
  }
  
  public String getName()
  {
      return name;
  }
  
  
  
  public int getAge()
  {
      return age;
  }
  
  public void setName(String kname)
  {
      name = kname;
  }
  
  
  public void setAge(int kage)
  {
      alter = kage;
  }
  
  }
  </code></pre>
  
  <p>and i'm creating and listing users within my userUI class</p>
  
  <pre><code>public class PersonalUI {
  
  public static void main (String args[]) {
      int menu = 0;
      int i = 0;
      while (menu != 3)
      {   
      System.out.println("Please choose: \n (1) Create User \n (2) List User                \n              (3) Quit");
      menu = Console.readInt();
      if (menu = 1)
      {   
      User user[i] = new User();
      System.out.println("Please enter a name");
      String kname = Console.readString();
      user[i].setName(kname);
      }
  }
  </code></pre>
  
  <p>My Problem: How can I create multiple objects as i'm getting an error for User user[i] = new User(); guess im just doing it wrong</p>