title: How to print elements from an array list
body: <p>I've looked online for help so far and nothing is working for me. This is what I have right now, can you please tell me what is wrong with it?</p>
  
  <p>import java.util.*;</p>
  
  <pre><code>class employeeProgram{
  
      public static void main(String[] args){
  
              for (int count = 0; count &lt; 1; ){
  
                      Scanner input = new Scanner(System.in);
  
                      ArrayList&lt;String&gt; employeeNames = new ArrayList&lt;String&gt;();
  
                      String commnd;
  
                      print("What would you like to do? (Add, Remove, List, Exit): ");
  
                      commnd = input.next();
  
                      if ("Add".equals(commnd)){
  
                              print("Enter the name of the employee you'd like to add to the list: ");
                              employeeNames.add(input.next());
  
  
                      } else if ("Remove".equals(commnd)){
  
                              print("Enter the name of the employee you'd like to remove from the list: ");
  
                              employeeNames.remove(input.next());
  
                      } else if ("List".equals(commnd)){
  
                              for (int j = 0; j &lt; employeeNames.size(); j++){
  
                                      println(employeeNames.get(j));
                                      println(j);
  
                              }
  
  
                              //println(employeeNames);
  
                      } else if ("Exit".equals(commnd)){
  
                              input.close();
                              break;
  
                      } else {
  
                              println("Invalid command.");
  
                      }
              }
      }
      public static void println(Object x){
  
              System.out.println(x);
  
      }
      public static void print(Object x){
  
              System.out.print(x);
  
      }
  
  }
  </code></pre>
  
  <p>The for loop isn't beginning, I know that much because the "println(j)" wasn't working either. When I tried the part that I've commented out, all I got from typing list was "[]" and nothing else. I'm a beginner, and this is my first program using ArrayLists, so thanks in advance to anyone who decides to help me out :)</p>