View Single Post
  #2 (permalink)  
Old 11-05-2007, 09:13 PM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,266
hardwired is on a distinguished road
Code:
public void wannabees() throws IOException { BufferedReader takeone = new BufferedReader( new InputStreamReader(System.in)); System.out.println("Enter wannabee:"); String[] aspiring; aspiring = new String[5] ; int i = 0; for (y = i; y >= aspiring.length; y++) { // The value of "i" is always zero. // You may want to use the variable "y" to select the // array elements for initialization, viz, "aspiring[y]" // in this next line. aspiring[i] = takeone.readLine(); System.out.println("take one! " + aspiring[y] + " action!"); } }
Reply With Quote