Chapter 8. Exceptions and Assertions

Terms you'll need to understand:

  • try

  • catch

  • finally

  • throws

  • throw

  • assert

Techniques you'll need to master:

  • Understanding when to use throws in method declarations

  • Writing code that creates and throws exceptions

  • Understanding when it is appropriate to use assertions

  • Writing code that uses the two versions of the assert syntax

Get Java 2™ Programmer Exam Cram™ 2 (Exam CX-310-035) now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.