Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If an exception is thrown and is not caught anywhere in the program, then the program terminates. True False Review Check to review before finishing

image text in transcribed

If an exception is thrown and is not caught anywhere in the program, then the program terminates. True False Review Check to review before finishing (will be flagged in Table of Contents) Question 2 of 5 A try statement must have at least one catch statement, but could have many catch statements, and may or may not have a finally clause. True i False Review Check to review before finishing (will be flagged in Table of Contents) Question 3 of 5 (worth 3 points) A finally clause will execute A. only if the try statement that precedes it does not throw an exception B. only if the try statement that precedes it throws an exception that is caught C. only if the try statement that precedes it throws an exception that is not caught D. only if the try statement that precedes it throws an exception, whether it is caught or not E. in any circumstance Review Check to review before finishing (will be flagged in Table of Contents) Question 4 of 5 (worth 3 points) When a program terminates because a thrown exception is not handled, the program A. starts up again automatically B. crashes and opens a dialog box, which asks the user whether the program should start again, end, or enter a debugging mode c. crashes and saves all output to a disk file called the "runStackTrace.txt" D. Crashes and opens a dialog box for the user to specify a disk file name, and all output is stored to that disk file E. crashes and outputs a message indicating what and where the exception was thrown Review Check to review before finishing (will be flagged in Table of Contents) Question 5 of 5 (worth 3 points) Which of the following Exceptions could be thrown by this piece of code? int iNum =0; String s Temp =" "; Scanner reader = new Scanner(System.in); System.out.printin("Enter an integer number: "); stemp = reader.nextLine(); iNum = Integer.parselnt(sTemp); A. Arithmeticexception B. InputMismatchException C. NumberFormatExeption D. StringParseException E. NullPointerException

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

What would you do?

Answered: 1 week ago