Hi all, Can anyone please help me with the following; The System class declares the following variable public static final InputStream in The InputStream class here is abstract. System.in can now be used to get command line input. The System class does not extend InputStream so how does this work??
If you want to read lines from System.in, you need something like this... BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); String userInput = bf.readLine(); You should get text when the enter key is hit.
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
Gift giving made easy with the permaculture playing cards