Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Stupid question, but...

Name: Anonymous 2008-08-31 0:43

In Java 6, what is the command to receive keyboard input from a user and store it in a variable?

For example, if I had something like

---------

package averageinput;

public class AverageInput {
 
    public static void main(String[] args) {
      
        int n1, n2, n3, n4, n5, n6, n7, n8, n9, n10;      
      
    }
}

-----------

How could I prompt for and receive keyboard input from a user and store the keyboard input in n1, or n2, or n3, etc. as int?

I'm a total newbie, my only experience has been a little with the (unpopular, I know) C# language.

Name: Anonymous 2008-08-31 1:49

http://java.sun.com/javase/6/docs/api/

[java.lang.]System.console().readLine();

yeah yeah, DON'T HELP HIM etc etc

Also, System.in, System.out, System.err.  Everything's in the javadocs.  Much better than the piece of shit documentation C# has.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List