My take on Java 7 features

JDK 1.7 Features

JDK 1.7 Features

No wonder the features look quite impressive indeed. Use of “String” in switch statement was long due! 🙂

InvokeDynamic is also a very useful feature. I have been using C# for quite some time and InvokeDynamic has certainly saved lot of time and improved readability of the code.

1) var foo = new List<int>();
2) List<int> foo = new List<int>();
First statement looks much cleaner. Let’s look at a more complex scenario:
List<Map<int,string>> foo = new List<Map<int,string>>();    //InvokeDynamic is highly recommended without a doubt!

TLS and Swing improvements are welcome! New IO API is welcome as well.

According to what I’ve read they’ve decided to improve the release schedule to get the product out quicker. This is why some features were dropped from the 7 release. Shortly after the release, Java team will release 7.1 with some of those dropped features. I did not think 7 was ever going to be released since they were playing around with closure proposals rather than looking at what is already in existence.

I am really interested in closures. The “automatic resource management” has been in C# since the very beginning. Every C# dev is familiar with the “using” statement. Now, why would Java choose the weird-looking syntax of “try {}” instead of “using {}”? Strange!

leave your comment