Section 1: Revising old, and what can be next
Section 2: Why/ What/ How- New one is better?- Java 9 is awesome!
1. What we know from Java 8?<potentially- Interview Questions>
JDK 8 was about
2. What can be introduced in Java 10?<potentially- Interview Questions>
Refer JDK 10 for getting tunes to what will come.
However from may sources following are confirmed for now:-
enhance lambda functionality,
including better disambiguation,
use of the underscore for unused parameters,
and shadowing of outer variables
1. What we know from Java 9 and why should we be motivated for Java 9?<potentially- Interview Questions>
While much of this may not mean a great deal to a business owner, the new features of Java 9 have lots of meaning for developers, as they look at what’s new. Here is an overview of four of the most important.
Jshell: This is a new command line tool. It means that if a developer wants to run just a few lines of Java as a standalone, it can be done without having to wrap it all in a separate method or project.
Microbenchmarks: Now, the performance of very specific and small pieces of code can be measured with a standardized method. The Java harness (JMH) for analyzing down to nanoseconds is unique to Java 9.
Full Support for HTTP 2.0 Client: This is a speed thing, and HTTP 2.0 Client has shown to provide greater speed, ranging from 11.81% to 47.7% over HTTP 1.1 Client.
Process API: An API (application programming interface) allows app’s processes communicate with each other without using native code. This update in Java 9 will extend the ability of Java in controlling and managing OS processes.
Modular Source Code: Organizes JDK source code into modules.
The Jshell Command Line Tool
As mentioned above, this is an interactive tool that will allow testing of small snippets of code rather than requiring the creation of a new class. This new shell also comes with history and auto-completion features as well as other functionalities, like saving and loading some or all written statements.
This API will allow the encapsulation of a set of images that all have different resolutions into a single object. Thus, a developer can retrieve an image that is resolution-specific or retrieve all variants within the image.
Unified JVM Logging
Now there is a common logging system for all JVM components. However, if we look at pros and cons of Java 9, here is one. It doesn’t add logging calls from all JVM components and doesn’t add logging to Java code in the Java Development Kit.
This is an improvement over Java 8, as these interfaces will better support the interoperability of a number of asynchronous systems that run on JVM’s (Java Virtual Machines). The idea behind JVM’s is that they allow any computer to run a Java program, by converting Java code into machine language and then executing it. Improvements in this area are one of the big advantages of Java 9.
The JDK 9 page lists nearly ninety features, including the following subset listed here:
200: The Modular JDK (Jigsaw/JSR 376 and JEP 261)
201: Modular Source Code
220: Modular Run-Time Images
238: Multi-Release JAR Files
259: Stack-Walking API
261: Module System
275: Modular Java Application Packaging
282: jlink: The Java Linker
193: Variable Handles
213: Milling Project Coin
222: jshell: The Java Shell (Read-Eval-Print Loop)
266: More Concurrency Updates
269: Convenience Factory Methods for Collections
277: Enhanced Deprecation
285: Spin-Wait Hints
250: Store Interned Strings in CDS Archives
280: Indify String Concatenation
228: Add More Diagnostic Commands
240: Remove the JVM TI hprof Agent
241: Remove the jhat Tool
214: Remove GC Combinations Deprecated in JDK 8
245: Validate JVM Command-Line Flag Arguments
248: Make G1 the Default Garbage Collector
158: Unified JVM Logging
264: Platform Logging API and Service
271: Unified GC Logging
224: HTML5 Javadoc
225: Javadoc Search
254: Compact Strings
110: HTTP 2 Client (and begin replacing "the legacy HttpURLConnection API")
236: Parser API for Nashorn
289: Deprecate the Applet API
292: Implement Selected ECMAScript 6 Features in Nashorn
102: Process API Updates ("Improve the API for controlling and managing operating-system processes.")
272: Platform-Specific Desktop Features
253: Prepare JavaFX UI Controls & CSS APIs for Modularization
257: Update JavaFX/Media to Newer Version of GStreamer
251: Multi-Resolution Images
262: TIFF Image I/O
227: Unicode 7.0
267: Unicode 8.0
219: Datagram Transport Layer Security (DTLS)
256: BeanInfo Annotations
260: Encapsulate Most Internal APIs
274: Enhanced Method Handles
295: Ahead-of-Time Compilation
Apart from power and best features of Java 8, 7, 6, 5. I am sure many of us must have realized.
JDK 9 is also about,
2. Are we convinced, why we should learn this great programming language?
3. Now can we try getting our hand dirty, enjoy your level, So, write 10 programs utilizing Java 9?
STEP1. Download latest eclipse from Eclipse Oxygen M5 Packages | Packages (Why Eclipse Oxygen M5 , answer is https://www.eclipse.org/eclipse/news/4.7/M5/ ) or Netbeans 8.2 from https://netbeans.org/downloads/
STEP2. Download JDK 1.9 and Java docs from https://jdk9.java.net/download/
STEP3. Configure Eclipse, and JDK.
STEP4. Write hello world program and more.
<I will update/ evolve it in best way and best content soon. Thanks for bearing with me. Kindly revisit>