Java 10 New Features

28/12/2020

What’s New in Java 10 and What are the Future Plans?

Recently Java has changed the pace of releases. Previously, it would take years to come up with a new Java version. But Java 10 was released into the world only six months after Java 9. It seems Oracle is going to try to get new Java versions to developers as soon as possible. Faster release of Java versions means that developers will have access to new features sooner. On the other hand, fast developer adoption will lead to more Java popularity. So, it’s a win-win for both parties.

What’s New?

Here are some of the important Java 10 features:

Local Variable-Type Inference: Java requires explicitly typed variables to ensure “type safety”. It is used as a design principle to minimize runtime errors. However, explicitly typing variables for loop iterators and intermediate values make Java programming time-consuming and error-prone. With local variable-type inference, Java compiler will be able to infer the type of a variable from context. It should speed up programming in Java.

Parallel Full GC for G1 Garbage Collector: Sometimes garbage collection gets priority over running program and the program execution is frozen to give garbage collection exclusive access to the JVM. This is known as “Full Garbage Collection”. In Java 10, this process has been optimized to run parallel threads on multiple processors. It makes the process more efficient.

Application Class Data Sharing: It will optimize startup time and footprint. If a jar doesn’t change, then class-data also doesn’t change. Once the class-data is created, it can be put in an archive and reused across multiple JVMs.

Experimental JIT Compiler: Just-in-time (JIT) compilers help developers write efficient applications. But Java’s JIT compiler was written in C++. The new JIT is Java-based. It will make it easier for developers to maintain the code.

Docker Awareness: Java 10 JVM will know if it is running in a Docker container. Instead of talking to the operating system directly, the JVM will get the information from the Docker container.

Consolidate the JDK Forest into a Single Repository: Various JDK forests are combined into a single repository. It improves housekeeping and streamlines development.

Heap Allocation on Alternative Memory Devices: HotSpot VM will be able to allocate Java object heap on an alternative user-defined memory device.

Root Certificates: JDK 10 is has been developed with the cooperation of OpenJDK. It will provide a default set of root Certification Authorities.

Future Plans

Here are some future considerations for Java:

  • Amber project is helping create productivity-oriented features like local variable-type inference, enhanced enums, and lambda leftovers.
  • Project Panama is working on interconnecting JVM and native code.
  • Project Valhalla is trying to develop major language features for Java 10.
  • Project Loom is focusing on simplifying the development of concurrent applications. It will preserve the general Java threads while improving performance and reducing footprint.

Conclusion

The new fast-paced release cycles mean that features might get pushed to the next release more often than before. But overall, JDK 10 features should be great for everyone.

References:

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

CentOS Install OpenJDK

When it’s necessary to build your apps or do some programming on Java, it’s always important to have all the necessary...
29/12/2020

Install Oracle JDK 9 on CentOS7

JDK or Java Development Kit is used by Java programmers all over the world to compile and run Java code. Java and JDK is...
28/12/2020

Installing JDK on Debian 10

Java Development Kit or JDK in short is used to develop and run Java applications. There are two variants of JDK, a) OpenJDK...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

SỰ KHÁC BIỆT GIỮA RESIDENTIAL PROXY VÀ PROXY DATACENTER
17/02/2024

Mua Proxy v6 US Private chạy PRE, Face, Insta, Gmail
07/01/2024

Mua shadowsocks và hướng dẫn sữ dụng trên window
05/01/2024

Tại sao Proxy Socks lại được ưa chuộng hơn Proxy HTTP?
04/01/2024

Mua thuê proxy v4 nuôi zalo chất lượng cao, kinh nghiệm tránh quét tài khoản zalo
02/01/2024