Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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. incorrect

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions