5 Things You Need to Know About Java 9Neeti Kotia
Java has been at the center of software development for a very long time and it doesn?t seem to be stopping any time soon. The reason it doesn?t get outdated is that it evolves faster than it gets old. Plus, there is the immense versatility that makes it the go-to choice for solutions that require many dependencies. From web and mobile apps to IoT and enterprise solutions, there is hardly a domain that Java hasn?t touched and left its mark.
Yes, it did pause on its track for a while. Java 8 was a very popular version- upon which most of the applications still run. But as it seemed, Oracle forgot about it for a while thus updating it only after 3 long years! Now the Java 9, as you would expect, the best Java has ever been and here are 5 things you should know about it:
No matter how good something is, if you leave it for a long time, it will deteriorate (except wine of course!). The problem with Java release cycle was that it followed a ?feature-driven update? meaning an Oracle will work on new features and fixes and when they are done, they would release the next version. As you would expect, with no time timeline, it would continue to perfect those features without the regard of those millions of developers suffering from existing problems.
Java 9 was one suchlast update. Every new update will now follow a time-driven update, which means a new version will be released every 6 months and will include features that are ready by then, leaving the others for the next release.
Java is old, very old. Over the last 2 decades its platform has grown tremendously and because it relies on runtime library, classes getting entangled are something we have witnessed. Plus, as we had no other way to encapsulate those classes in JDK, that forced developers to turn to external libraries. Java 9 has now overhauled that entire structure by dividing JDK into 90 different modules. The classes can be encapsulated and packages of module accessed by another only if it is explicitly exported. This makes the life of developers a lot easier and large applications more structured as they can easily keep track of all the dependencies.
In recent years, Java has come under massive security attacks. So much so that many browsers started outright blocking it! Many of those attacks exploited one serious vulnerability- data serialization. With Java 9, developers now have the option of filtering them into a black and white list, thus making applications much more resilient.
Additionally, there are also many network related security improvements- which is important given its usage in IoT development services. It now also supports stapling of certificates.
If you have a lengthy code of Java lying around, try running it on Java 9 and you would realize that the performance has taken a significant jump and memory usage has taken a slide. It is due to the fact that now every string that can be represented by ASCII code requires only one byte of storage and because most of the strings used in coding are standard strings, it drastically brings down the memory required by the program and improves performance.
It?s every programmer?s nightmare to compile and execute the entire code to test the behavior of even small snippets. Especially at a time when most of the frameworks offer a live-reload feature, Java web application development had started to seem a bit outdated. But Java 9 has introduced JShell where you can directly enter snippets of code to view output instantly.
Also if you are frustrated by the time and effort it takes to create Collections, Collection Factory can help complete the same task with a single statement.