You created a Quiz class that contains an array of 10 multiplechoice questions to which the user
Question:
You created a Quiz class that contains an array of 10 multiplechoice questions to which the user was required to respond with an A, B, or C. At the time, you knew how to handle the user’s response if an invalid character was entered. Rerun the program now to determine whether an exception is thrown if the user enters nothing—that is, the user just presses the Enter key without making an entry.
If so, improve the program by catching the exception, displaying an appropriate error message, and presenting the same question to the user again. Save the file as QuizWithExceptionsCaught.java.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: