Answers to Exam Questions

A1: This question is pretty straightforward. The answers should be organized .according to the four subquestions (A through D). The first answer is limited to four sentences and the third answer is limited to a maximum of twelve sentences (six advantages/disadvantages at two sentences each). The following is a sample response to this question:
  1. Two ways to notify a caller of a method that the method has failed its operation are 1.) throw an exception that indicates the type of failure that occurred, or 2.) return a value that indicates the success or failure of the method.

  2. I used the first approach (throwing an exception) in my programming assignment.

  3. The advantages of using exceptions include the following: 1.) It is the ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.