Java 8 at a glance

I’ve just attended a talk about Java 8 by Chuk Lee at NUS Hackers meetup, and here’s the summary. If you’re impatient and want to try the code,  go directly to java-8-at-a-glance repository. 🙂

Chuk started the presentation with short history of JDK, some points to note:

  • Oracle acquired Sun on 2010, while JDK  7 was still under development
  • At that time JDK 7 was very ambitious project, trying to make JDK more modular (i.e. we can choose which component of JDK to run our app), add lambda expressions and many more.
  • Oracle asked Java community to vote, whether to release JDK 7 ASAP with incomplete intended features, or wait longer but with more complete features.
  • The Java community chose the first option, and JDK 7 was released on 2011 (5 years after JDK 6 released) with decent features[1] such as NIO2, type inference in generics, and  fork/join framework.
  • However the promised modularity and lambda expression are not available in JDK 7.
  • And here they are.. Java 8!

So, what are the highlights in Java 8?

  • On language point of view: lambda expression, interface evolution
  • On libraries point of view: stream & bulk data operations on collections
  • On platform point of view: profiles option, a step towards modularity

Nope, we are not talking about Java Island
Nope, we are not talking about Java Island[9]
Continue reading Java 8 at a glance