Code samples for java7 new features