import java.util.*;
public static void main(String[]args)
{
//..
..
..
..
Scanner keyboard = new Scanner(System.in); // this declares an instance of Scanner named keyabord
int x = keyboard.nextInt(); // reads an integer
String y = keyboard.nextLine()l // reads a string
http://java.sun.com/j2se/1.5.0/docs/...l/Scanner.html
^^ for more information on Scanner.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
|