Home  >  Forum  >  Core Java
Post New Query

Java 10 New Features



Asked on December 06, 2018
What are the new features and enhancements in Java 10?


Replied on December 06, 2018

Find the short description of Java 10 new features and enhancements.


 

1. A new method orElseThrow added to Optional class.


 

2. To create unmodifiable collections following methods have been added.

 

List.copyOf, Set.copyOf, and Map.copyOf

 

And in java.util.stream.Collectors, the methods toUnmodifiableList, toUnmodifiableSet, and toUnmodifiableMap have been added to get unmodifiable collections.

 


3. A new system property jdk.disableLastUsageTracking has been introduced to disable JRE last usage tracking for a running virtual machine. It is used with command line as Djdk.disableLastUsageTracking=true or -Djdk.disableLastUsageTracking

 


4. Passwords present in the jmxremote.password file are now being over-written with their SHA3-512 hash by the JMX agent.

 


5. (JEP 307) A full GC has been parallelized in G1 garbage collector that will take place when the concurrent collections can't reclaim memory fast enough.


 

6. (JEP 319) A default set of root CA (Certification Authority) certificates has been provided in JDK 10. It solves the problem of the empty cacerts keystore in the OpenJDK 9 binary for Linux x64 that was preventing TLS connections from being established because Trusted Root Certificate Authorities were not installed.

 


7. (RFC 7627) TLS Session Hash and Extended Master Secret Extension has been supported. We can disable it by using System Property jdk.tls.useExtendedMasterSecret to false 

 

 

8. Bytecode generation for enhanced for loop has been improved.


 

9. A new javadoc command-line option --add-stylesheet has been added to the javadoc tool.



10. A new option --overridden-methods=value, has been added to the javadoc tool. 


 

11. A new inline tag {@summary ...} has been added to explicitly specify the text used as the summary of the API description.

 

 



Reference


https://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html

 

 

 

 

 

 



Write Answer







©2019 concretepage.com | Privacy Policy | Contact Us