Exciting New Features In Java 9
In September, Oracle released Java
SE 9 with over 150 new features. The latest version of the widely used
programming language comes with several new features and APIs to accelerate
development of applications for both large and small devices. At the same time,
the features provided by Java 9 help programmers to improve application's
performance, security, and maintainability. Hence, it becomes essential for
programmers to understand some of the key features provided by Java 9.
What Programmers Need to Know about
Java 9?
Module System
The developers can now use Better
Support for HTML5 and JavaScript to divide JDK into multiple modules. Each
modular JAR file contains a module descriptor. The developers can define
interdependency of various modules through requires statements. The modularity
makes it easier for programmers to run JVM modules smoothly on small devices
that lack additional memory. At the same time, they can also run only the APIs
and JVM modules required by the application - java training.
Ahead-of-Time Compilation
Java 9 improves code compilation
process significantly through ahead-of-time (AOT) compilation. The programmers
can leverage AOT compilation compile Java classes into native code even before
the virtual machine launches them. AOT compilation improves the performance of
both large and small applications by overcoming major shortcomings of
just-in-time (JIT) compilation. Unlike JIT compilation, AOT compilation ensures
that no Java method remains uncompiled.
Real-Eval-Print-Loop Tool
Java 9 comes with a new
real-eval-print-loop (REPL) command line tool - Shell. Shell is designed with
features to evaluate declarative statements and expressions interactively. A
programmer can use Shell to assess the quality of Java code before compilation.
He can simply enter a piece of code and collect feedback. Shell even has the
capability to complete tabs and add required terminal semicolons automatically.
The new REPL tool makes Java compete with widely used programming languages
like Python and Scala.
Comments
Post a Comment