Java 10 - New-Added-APIs-and-Options


73 new API’s has been added in Java 10. Let’s go through a few of them:

APIDescription
Optional.orElseThrow()A new method orElseThrow has been added to the Optional class. It is synonymous with and is now the preferred alternative to the existing get method.
List.copyOf, Set.copyOf, and Map.copyOfThese methods create new collection instances from existing instances.
Collectors.toUnmodifiableList, Collectors.toUnmodifiableSet, Collectors.toUnmodifiableMapThese methods allow the elements of a Stream to be collected into an unmodifiable collection
--jdk.disableLastUsageTrackingTo disable JRE last usage tracking for a running VM.
--add-stylesheetProvides support for the use of multiple stylesheets in the generated documentation.
--main-stylesheetTo help distinguish the main stylesheet from any additional stylesheets.
@summary TagAdded to explicitly specify the text used as the summary of the API description. By default, the summary of an API description is inferred from the first sentence.





javacodegeeks is optimized for learning.© javacodegeeks .
All Right Reserved and you agree to have read and accepted our term and condition