01: import java.io.BufferedReader;
02: import java.io.IOException;
03: import java.io.InputStreamReader;
04:
05: public class InputTest
06: {
07: public static void main(String[] args)
08: throws IOException
09: {
10: BufferedReader console = new BufferedReader(
11: new InputStreamReader(System.in));
12: System.out.println("How old are you?");
13: String input = console.readLine();
14: if (input != null)
15: {
16: int age = Integer.parseInt(input);
17: age++;
18: System.out.println("Next year, you'll be " + age);
19: }
20: }
21: }