I have been making drivers and have been using the BufferedReader to read in user input initialized as so
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
Whenever I go to read in a value say
int userAns = Integer.parseInt(input.readLine());
I will need to surround this with a try/catch block which is okay because I want to catch errors. Although, I have noticed I have never caught the IOException which I am forced to make a catch statement for.
So my question is, when would this error ever occur? I assumed it has to do with dealing with reading/writing to/from files, but in this case I am just reading in user input.