Learn free java11 tutorials

Java 11 String methods| lines strip isBlank method

June 27, 2021 ·  2 min read

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

Java 11 - Optional and Primitive Optional classes Changes - isEmpty() method

June 24, 2021 ·  2 min read

In this blog post, We are going to learn changes to Optional and primitive optional Class in java 11 with examples. Optional Classes IsEmpty Method java.util.Optional class is introduced with java8.with java 11 features list, isEmpty Method is introduced to the following classess. java.util.Optional java.util.OptionalInt java.util.OptionalLong java.util.OptionalDouble This method checks and return true if a value exists, else return false prior to 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

June 21, 2021 ·  3 min read

In this blog post, We are going to learn the new methods added to java.nio.file.Files class. java.nio.file.Files class  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, Files class added below methods for converting file content to/from strings. Java 11 Files new methods String Files.readString(Path path)  String Files.readString(Path, Charset)  Path Files....

java 11 features - Default Collection Method toArray(IntFunction) example

June 16, 2021 ·  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, Developer need to convert Collection to Array types, This will ease and simplify the developer life Signature...

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