Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need the answers for his. Consider the following test method code fragment, which tests if a method throws an IllegalStateException (and not any other
I need the answers for his.
Consider the following test method code fragment, which tests if a method throws an IllegalStateException (and not any other type of exceptions) when passed an invalid input. Which of the following lines should return false to indicate that the test has failed? There may be MORE than one correct answer! try \{ methodCall(invalidInput); // 1. Line after method call \} catch (IllegalstateException e) \{ // 2. correct \} catch (Exception e) \{ // 3. incorrect \} // 1. line after method call // 2. correct // 3. incorrectStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started