Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this chapter, we will cover the following:
Using string literals in switch statements
Using underscores in literals to improve code readability
Using the try-with-resources block to improve exception handling code
Creating a resource that can be used with the try-with-resources technique
Catching multiple exception types to improve type checking
Re-throwing exceptions in Java 7
Using the diamond operator for constructor type inference
Using the @SafeVarargs annotation