• Test Invariants by Using Assertions
• Develop Code That Handles Multiple Exception Types in a Single catch Block
• Develop Code That Uses try-with-resources Statements (Including Using Classes That Implement the AutoCloseable Interface)
Q&A Self Test
If you are coming back after having sat the OCA, congratulations! You are now ready to progress to the OCP. The assertion mechanism, added to the language with version 1.4, gives you a way to do testing and debugging checks on conditions you expect to smoke out while developing, when you don’t ...