Code samples for java8 new features