import java.io.*;
class GetUserInput{
public static void main(String[] args){
//the data that will be entered by the user
String name;
int a;
//an instance of the BufferedReader class
//will be used to read the data
BufferedReader reader;
//specify the reader variable
//to be a standard input buffer
reader = new BufferedReader(new InputStreamReader(System.in));
//ask the user for their name
System.out.print("What is your name? ");
try{
//read the data entered by the user using
//the readLine() method of the BufferedReader class
//and store the value in the name variable
name = reader.readLine();
//print the data entered by the user
System.out.println("Your name is " + name);
}
catch (IOException ioe){
//statement to execute if an input/output exception occurs
System.out.println("An unexpected error occured.");
try{
a = reader.readLine90;
System.out.println("Your age is:" + a);
}
catch (IOException ioe){
//statement to execute if an input/output exception occurs
System.out.println("An unexpected error occured.");
}
}
}