Wednesday, November 23, 2016

Java 6 vs Java 7


Java 6 was released in 2006 and is still having a good innings in some software projects around the world, even though Oracle stopped public updates in February 2013. New versions of Java (7 and 8) have emerged since then and that makes it an even more desirable platform to develop software with. 


above image is from the website: https://plumbr.eu/blog/java/java-version-and-vendor-data-analyzed-2016-edition

This article looks at the major additions that I noticed that came with Java 7, which is by the way also not updated publicly anymore since April 2015. I will comment on the changes that Java 8 brought in March 2014 in my next post.

Java is very good in being downward compatible to its older versions. It is very likely that you did not notice much change if you stuck to a more general usage of the language. 

  

above: A different look at the Java SE changes over the years from Tim Ellison: From the Slideshare presentation What's new in IBM Java 8 SE

Remembering Java 6

Let's remember, Java 6 brought two almost revolutionary new ways into the coding paradigm, it firstly allowed for the selection and invocation of a java compiler programmatically! This neat little trick opened up the door to allow us to use new and very creative ways of extending and integrating code into our applications. The second one was the "new kid around the blog" called "Support for pluggable annotations". These two additions allowed frameworks such as Spring and Hibernate to continue to flourish and do so even more powerfully, which largely impacted on the way we write our Java applications today.

Java 7 additions

Java 7 had also a fair share of its own revolutionary additions. First of all, the Java Virtual Machine started to support dynamic languages. This made the integration of languages such as Ruby, Scala, JavaScript, and many more possible.

On the programming front, changes that I welcomed, were, for example, allowing underscores in numeric literals (I use it to make a number with many digits more readable), catching multiple exception types and rethrowing exceptions with improved type checking allowed me to remove unwieldiness in my code, the diamond operator <> saved me from unnecessarily duplicating information in my code when I wanted to use generic instance creation, and finally try-with-resources made my code cleaner and stopped me from losing important exception information in some cases.

The new file I/O library added support for multiple file systems, file metadata, and symbolic links - not that I need this functionality too often. Having said this, the Tiniest Module Container uses local file access and so I might update the code to use this new library.

There were also additions and optimizations in Java2D, several encryption methods were added/deprecated, and Unicode was updated to 6.0, along with a number of other internationalization enhancements.

Java 7 continues being one of the major forces in the software development industry and the latest Java version updates together with the rise of Android have made Java the number one software development language at this moment. 


above image is from the LinkedIn post by Sony George: Most popular programming languages today


No comments:

Post a Comment