Deputy CTO at Azul Systems
Occasionally something in Java pops up that I thought I knew about, but it turns out I didn’t appreciate all the subtle details.
This was recently the case for “nul”. Before I started using Java, the main programming language I used was C. This was great for things like operating systems and device drivers because it uses explicit pointers. References to data are through a numerical address that can be manipulated if required.
Although null might seem like a simple, straightforward concept, there are some edge cases that make its use require a little more thought. I hope this provides you with a better understanding of nothing (null).S. Ritter
Unlike sealed classes, hidden classes (JEP 371) are a JVM rather than a language-level feature. One of the specific goals of this feature is not to make any changes to the Java language.
A hidden class is not discoverable by the JVM during bytecode linkage, nor by programs making explicit use of class loaders. Hidden classes can be unloaded independently of the class that uses them. This allows them to be garbage collected in the usual way since there is no longer any references to them.S. Ritter
The most significant new feature in JDK 15, and the only change to the language, is the introduction of sealed classes as a preview feature.
Sealed classes (explained in detail in JEP 360) provide a fine-grained mechanism that allows a developer to restrict which other classes or interfaces may extend them. You can think of final classes as the ultimate sealed class since no other classes can extend them.S. Ritter
February 12th, 1996. This is a significant date for me personally since it was the day I started work at Sun Microsystems as a Solaris Systems Engineer. It was also two weeks and six days after the release of the Java Development Kit (JDK 1.0).
Of course, the origins of Java go further back than this; James Gosling and others started work on a new programming language in 1991, and it was the May 23rd 1995 when Java was officially announced to the world.
As a language, Java has evolved over the last 25 years in a way that has, with few exceptions, provided excellent backwards compatibility.S. Ritter
Well, another six months have passed, and we have another release of Java, this one pretty packed with exciting new features. It is, therefore, time for another blog post trying to list everything new in JDK 14.
In total, there are a very impressive 16 JDK Enhancement Proposals (JEPs) and 69 new API elements.
Let’s start with the more significant items that introduce changes to the Java language syntax.S. Ritter