Javase 7 Features: String in Switch Statement
Javase 7 Features: String in Switch Statement
Switch statements work either with primitive types or enumerated types. Java 7
introduced another type that we can use in Switch statements: the String type.
In JDK 7, you can express literal values in binary with prefix '0b' (or '0B') for integral
types (byte, short, int and long).
or
try-with-resources:
Java 7 has introduced another cool feature to manage the resources automatically.
In JDK 7, a single catch block can handle more than one exception types.
SafeVarargs:
Diamond operator <> is a new Java 7 feature which provides type inference while
creating object of Generic classes.