Java 7 is here

Well almost here :)

I am quite excited about the new release of Java SDK. Here are couple of my favorite new features.

  • Strings in switch statements: Now Strings can be used in switch statements , saving us implementing a horrendous if block.
  • Try with resources: You can now declare auto closable resources in try and cleaning up of these resources are done automatically. No more massive finally blocks :)
  • Diamond formation for generics declarations
  • Multi catch clauses: If your catch blocks are the same now you don’t need to declare them separately. Different exception types can be declared in the same catch block separated by |

Here is the link for all new features:

http://openjdk.java.net/projects/jdk7/features/