Duke - Java 8It’s been a little more than a year since Java 8 was released (2014/03/18) and you might think that it’s a little too late for a What’s new in post. In fact latest public update available is 8u40, so let’s review not only what was initially included in Java 8, but what else has changed during this first year, up to release 8u40.

Lots of changes were included in the initial Java 8 release, being probably the most notable of them, in my opinion (feel free to disagree, looking forward to discussions):

  • Java Language
    • Lambda Expressions
    • Method references
    • Default methods
    • Functional interfaces
    • Method parameter reflection
    • Optional references
  • API
    • Collections Streams API
    • Date-Time API (based on the popular Joda time library)
    • Parallel Array Sorting
    • Base64 encoding and decoding
    • Unsigned Arithmetic Support
  • Tools
    • Nashorn Script Engine – Javascript in the JVM
    • Java Mission Control

… among many other optimizations, fixes and new capabilities. You can get a fully detailed changelog detail here.

We’re not going to go into further detail for these new characteristics, as you’ll find plenty of articles about them. Furthermore some of those would require entire books to proper explain and deal with them, and that’s not the purpose of this article.

But let’s review what has changed during this first year of Java 8’s life (up to 8u40 release). Again, these are the most important in my opinion:

  • New jdeps analysis tool
  • Advanced Management Console (AMC)
  • New Garbage Collection Tuning Guide added to JDK 8 documentation
  • SSLv3 disabled by default
  • Java Flight Recorder can be enabled in runtime

… and many other improvements and bugfixes.

And last but no least, we should talk about Java 8 adoption rate, which has been surprisingly higher than initially expected based on a Typesafe’s survey:

Java 8 Upgrade Plans

Interestingly, one of the conclusions extracted from that survey is that the inclusion of Lambdas in the Java language has not hurt Scala at all, but validated its approach to Functional Programming:

Java 8 vs Scala

Other references: