View Single Post
  #1 (permalink)  
Old 11-05-2007, 02:12 PM
smilejava smilejava is offline
Member
 
Join Date: Oct 2007
Posts: 9
smilejava is on a distinguished road
input placed in array
im working on this exercise of mine, trying to do the interface,i already made it without the array.. but when i tried to add array the Buffered reader i think is not working.. here's the code....

Code:
package sampInterface; import java.io.*; public class Main { int y = 0; public static void main(String[] args) throws IOException { Artist smile = new Artisttalent(); Main smile2 = new Main(); smile2.wannabees(); audition(smile); } static void audition(Artist s) { s.act(); s.dance(); s.sing(); } public void wannabees() throws IOException { // TODO Auto-generated method stub 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++) { aspiring[i] = takeone.readLine(); System.out.println("take one! " + aspiring[y] + " action!"); } } }
Sponsored Links