Sample program written to learn new features in Java 7