I am coding in Java on Textpad on a Windows 8. When the program runs and the user enters their input, as soon as the user enters his input, it says
Interrupted! Tool completed with exit code 130.
Have not been able to figure out the problem and need help.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class userinput {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
private int rollno;
private String name;
public void get() throws IOException, NumberFormatException {
System.out.print("Enter the rollno :");
rollno = Integer.parseInt(br.readLine());
System.out.print("Enter the name :");
name = br.readLine();
}
public static void main(String args[]) {
userinput a = new userinput();
try {
a.get();
} catch (IOException e) {
System.out.println("Invalid Entry");
} catch (NumberFormatException f) {
System.out.println("Invalid entry");
}
}
}