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.
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.