Use built in Scanner class for keyboard input. import java.util.Scanner;
public class Assignment {
Scanner s = new Scanner(System.in);
System.out.println("Enter an Integer: ");
int i = s.nextInt();
//nextDouble returns double } }
|