{

Learn free java11 tutorials


Java 11 - Optional isEmpty() method example

December 1, 2022 ·  2 min read

In this blog post, We are going to learn changes to Optional and primitive optional Classes in java 11 with examples. Optional Classes IsEmpty Method java.util.Optional class is introduced with java8. In the java11 version, the isEmpty Method is introduced to the following classes. java.util.Optional java.util.OptionalInt java.util.OptionalLong java.util.OptionalDouble This method checks and returns true if a value exists, else returns false. Before Java11, If we want to check empty of Optional Classes, We will use....


Java 11 Features - java.nio.file.Files class new Methods | Read/write a string from to a file

December 1, 2022 ·  4 min read

In this blog post, We are going to learn the new methods added to the java.nio.file.Files class. What is java.nio.file.Files class in java11 This class is used for doing operations with files and directories of a file system. It provides various static methods for doing it. with Java 11, the Files class added the below methods for converting file content to/from strings. It introduced the following Java 11 Files and new methods....


Java 11 String methods| lines strip isBlank examples| new features

December 1, 2022 ·  2 min read

In this blog post, learn the six new methods added to the String class in Java 11. JDK 11 - Strings methods Java 11 Version added a few more methods to the string class. This method helps the developer to simplify the coding styles and improve performance. lines() example Returns the Stream of strings separated with a line break from multi-line strings Syntax Stream<String> lines() Stream lines = string....


java 11 toArray(IntFunction) default method & example

December 1, 2022 ·  2 min read

In this blog post, We are going to learn the Java 11 features - toArray(IntFunction) method. Default Collection Method - toArray(IntFunction) With Java 11 version, New default method toArray(IntFunction) is added in java.util.collection interface. You can check my previous on default method. This is used to return Array from a collection of objects dynamically. During development, the Developer needs to convert Collection to Array types, This will ease and simplify the developer life...


Subscribe
You'll get a notification every time a post gets published here.