Friday, July 29, 2011

Java 7 is here!

I've been looking forward to Java 7 for a long time and it is finally here! This release is jam-packed with new features and I am really excited about trying it out!

There are great additions to the concurrency package such as a fork/join framework, phasers, transfer queues and threadlocal pseudo-random number generators.

Also, as part of Project Coin (JSR 334), JDK7 includes a set of small language changes intended to simplify common, day-to-day programming tasks and reduce boilerplate such as:

  • Strings in switch
  • Binary integral literals and underscores in numeric literals
  • Multi-catch and more precise rethrow
  • Improved Type Inference for Generic Instance Creation (diamond)
  • try-with-resources statement
  • Simplified Varargs Method Invocation
For a full list of changes take a look at the release notes.

I'm going to be writing about the new features in Java 7 as I learn about them, so stay tuned!

2 comments:

  1. Daniel Livshin4:48 PM

    All very good but see here - http://www.infoworld.com/d/application-development/oracle-javas-worst-enemy-168828?page=0,1 for a good reason why not to touch Java 7 at the moment.

    ReplyDelete
  2. Hi Daniel! Yes, I've read about this bug, but it doesn't meant that you can't try out some of Java 7's great new features. I wouldn't recommend upgrading a production critical system to it just yet though ;) Thanks for reading.

    ReplyDelete