title: Turn commandline input into an array
body: <p>I'm working on a Bruce Eckel exercise on how to take a keyboard command line input and put it into an array. It's supposed to take 3 separate inputs and place them into an array and print them back out.  </p>
  
  <p>Here is the code I have so far: </p>
  
  <pre><code>//: object/PushtoArray
  import java.io.*;
  import java.util.*; 
  class PushtoArray { 
      public static void main(String[] args) { 
      String[] s = new String[3]; 
      int i = 0; 
  
      //initialize console 
      Console c = System.console();   
  
      while ( i &lt;= 2 ) {
          //prompt entry:
          //System.out.println("Enter entry #" + i + ": ");  
          //readin 
              s[i] = c.readLine("enter entry #" + i + ": "); 
  
          //increment counter 
          i++;                
  
      } //end while 
  
      //reset counter 
      i = 0; 
  
      //print out array
      while ( i &lt;= 2 ) { 
          System.out.println(s[i]);
              i++;
      } //end while 
      }//end main
  
  } //end class
  </code></pre>
  
  <p><strong>UPDATE:</strong> Now I get a different error:</p>
  
  <pre><code>PushtoArray.java:15: readline(boolean) in java.io.Console cannot be applied to (java.lang.string) 
        s[i]= c.readline("Enter entry #" + i + ": ");
  </code></pre>
  
  <p>I'm trying to read in from the command prompt but it isn't prompting at all.  It compiles correctly when I javac the java file. </p>
  
  <p>Am I using the wrong function?  Should I be using a push method instead of an assignment?</p>