A primary motivation behind the effort is reducing the size of version control metadata, which would preserve disk space and reduce clone size. The proposal notes that the .git directory of the jdk/jdk repo is approximately 300 MB with Git while the .hg directory is around 1.2 GB with Mercurial, depending on the version of Mercurial in use.
Specifically, Hermes is geared to fast startup, leveraging compact bytecode and ahead-of-time static optimization. In many cases, enabling Hermes will improve startup time, decrease memory usage, and result in smaller app size.
Go (golang) 1.13, the next version of Google’s open source language, is now in a beta stage. The update supports a more uniform and modernized set of number literal prefixes.
Java interfaces are different from classes, and it's important to know how to use their special properties in your Java programs. This tutorial introduces the difference between classes and interfaces, then guides you through examples demonstrating how to declare, implement, and extend Java interfaces.
You'll also learn how the interface has evolved in Java 8, with the addition of default and static methods, and in Java 9 with the new private methods. These additions make interfaces more useful to experienced developers. Unfortunately, they also blur the lines between classes and interfaces, making interface programming even more confusing to Java beginners.
A proposal floating in the OpenJDK community seeks to jumpstart Java on Apple’s iOS. The plan involves restarting work on the OpenJDK Mobile project, which is intended to build the OpenJDK classes and API for iOS and Android, said Johan Vos, CTO at mobile developer Gluon.
Vos recently posted a bulletin pertaining to these efforts. OpenJDK Mobile centers on providing the same APIs in the latest version of the OpenJDK source repository to iOS and Android, leveraging tools familiar to Java developers. The first focus, though, is on iOS, which has lacked traditional support for Java. Apple has not allowed the Java Virtual Machine to run on the platform.
Java would get a new graphics rendering pipeline for MacOS based on Apple’s Metal graphics APIs, under a proposal called the Lanai Project, being floated in the OpenJDK community.
Engineers from Oracle and JetBrains already have been exploring the Metal APIs, working on proofs of concept and prototypes in the JDK sandbox. Metal was designed as a long-term replacement for OpenGL as a rendering pipeline on Apple platforms, offering better performance and simpler GPU designs.
The Java Development Kit and OpenJFX currently use OpenGL, which Apple has deprecated. Currently, if OpenGL is not present in a MacOS system, JDK desktop APIs cannot function and will not start. OpenJFX is in a similar spot. Goals of Lanai include:
Classes and objects in Java must be initialized before they are used. You've previously learned that class fields are initialized to default values when classes are loaded and that objects are initialized via constructors, but there is more to initialization. This article introduces all of Java's features for initializing classes and objects.
Note that code examples in this tutorial compile and run under Java 12.
How to initialize a Java class
Before we explore Java's support for class initialization, let's recap the steps of initializing a Java class. Consider Listing 1.
Oracle’s shift from doing a major release of standard Java every three years to doing releases every six months, a plan announced in September 2017, has resulted in versions with far fewer new capabilities than before. And that are perhaps far less interesting.