-8

I am trying to build a program that talks to the user and I want it to know as much as possible. For that I need an ability to use what the user types in my programs code and not just in variables in a way that it is fully implemanted in to the code Or if there is now way, you know of just Tell me and I will accept it.

macht13
  • 9
  • 3
  • 1
    read about `Scanner` class http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html – nem035 Sep 23 '14 at 19:38

1 Answers1

0

The Scanner class can be used for input. Example:

Scanner scanner = new Scanner(System.in);
String age = "";
System.out.println("Please enter your age:");
age = scanner.next();

This code will get user input via the console.

brso05
  • 12,634
  • 1
  • 17
  • 37