Skip to main content

Posts

Showing posts with the label Java 8 features

Love and hate for Java 8 (Everything that you need to know)

Java8 isn’t scheduled for for release until March 2014, but early release versions have been available for a while. Some of the most interesting new features of Java 8 are:  Streams  Functional interfaces  Default methods  Lambdas  Java Time  Streams  The new java.util.stream package contains “classes to support functional-style operations on streams of elements”. Streams aren’t a new type of collection and don’t replace any of the existing ones such as Lists and Queues. Instead, they provide a way to interact with an existing collection, and in that respect are more similar to iterators.  The javadocs describe a stream as “a sequence of elements supporting sequential and parallel aggregate operations.” A stream pipeline consists of a source (e.g. a collection), intermediate operations (e.g. a filter or map) and a terminal operation, which produce a result (e.g. sum or count). Streams are lazy in that the operations on the da...