Question: please explain this catch - why do we put input.next line in one but not the other? what does it do? - what is the

please explain this catch
- why do we put "input.next line" in one but not the other? what does it do?
- what is the point of the last catch (exception), what does it do? is it neccessary to use always?  please explain this catch - why do we put "input.next line"

} catch (IndexOutOfBoundsException ex) { System.err.println("Level [" + level + ") has 5 courses." + "You cannot add more courses to this level.."); } catch (InputMismatchException ex) { System.err.println("Input Mismatch Exception"); input.nextLine(): } catch (Exception ex) 1 System.err.println(ex.getMessage(): input.nextLine()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!