Java: An Introduction to Problem Solving and Programming (7th Edition)
Java: An Introduction to Problem Solving and Programming (7th Edition)
7th Edition
ISBN: 9780133766264
Author: Walter Savitch
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 9.1, Problem 6STQ
Program Plan Intro

“throw” statement:

  • The keyword “throw” is used to throw an exception from the program. It is possible to throw either checked or unchecked exception.
  • When an exception is thrown using “throw” keyword, the “try” block ends and the statements inside that block will not get executed. The control directly goes to the subsequent “catch” block whose parameter matches the exception object.

Blurred answer
Students have asked these similar questions
Decide Whether you think the following statement is true or false?
Which of the following statements about the for statement is false?
How many times will the following code will print "Final Test"? three times none one time four times

Chapter 9 Solutions

Java: An Introduction to Problem Solving and Programming (7th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning