What happens in a method if there is an exception thrown in a try block but ther
ID: 3679165 • Letter: W
Question
What happens in a method if there is an exception thrown in a try block but there is no catch block following the try block? The program ignores the exception. The program will not compile without a complete try/catch structure. The program terminates immediately. The program throws an exception and proceeds to execute the finally block. A message is returned by which method of an Exception object? Which of the following exceptions might be thrown by the methods of the class String? Which of the following statements is NOT true about creating your own exceptions? Typically, constructors are the only methods that you include when you define your own exception class. The exception class that you define extends either the class Throw able or one of its subclasses. If you have created an exception class, you can define other exception classes by extending the definition of the exception class you created. You must throw your own exceptions using the throw statement.Explanation / Answer
13. solution d)
The program throws an exception and proceeds to execute a finally block
14.solution. b)
getmessage()
15. solution. a)
null pointer exceptions
16.solution. a)
Typically,constructors are the only methods that you include when you define your own exception class
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.