Java: An Introduction to Problem Solving and Programming (8th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
8th Edition
ISBN: 9780134462035
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?
What must be placed on the blank part of the code so that ? will be from ? to ?.
So is the value for '?' 6?

Chapter 9 Solutions

Java: An Introduction to Problem Solving and Programming (8th 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.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning