In this tutorial, we’re going to get through how to create an immutable Set in Java 9 by using convenience static factory methods of the Set interface, which have been added into Java 9. 1. Create An Immutable Set In… Continue Reading →
This quick tutorial is going to cover how to import the external library into Java 9 JShell. 1. Setting The Class Path For Java 9 JShell 1.1. Start Java 9 JShell With –class-path Option To import the external library into… Continue Reading →
In this tutorial, we’re going to get through how to use effectively final variables in the try-with-resources statement in Java 9. 1. The try-with-resources Statement In Java The try-with-resources statement is a try statement that declares one or more resource… Continue Reading →
1. Overview This tutorial is going to cover Java 9 HTTP/2 Client API. We’ll get through how to create a HttpClient object, make HTTP requests and handle HTTP Responses. Notice that the HTTP/2 Client API is an incubator module named… Continue Reading →
In this tutorial, we’re going to get through new methods that have been added to the java.util.Arrays class since Java 9, which enables us to compare arrays and slices of arrays in Java efficiently. 1. Compare Arrays Equality In Java 9… Continue Reading →
In this tutorial, we’re going to take a first look at the streams API updates in Java 9, which includes new stream operations: dropWhile, takeWhile, iterate and ofNullable. 1. The dropWhile() Method Firstly, let’s take a look at the syntax… Continue Reading →
This tutorial is going to cover about new methods of the Optional<T> class in Java 9. We’re going to get through 3 methods which recently added, have the syntax as follows: void ifPresentOrElse(Consumer<? super T> action, Runnable emptyAction) Optional<T> or(Supplier<?… Continue Reading →
This tutorial is going provide a quick reference for commands that will frequently encounter when we work with JShell in Java 9. Hopefully, this will be a useful Java 9 JShell cheat sheet. 1. What Is JShell The JShell tool… Continue Reading →
1. Overview This quick tutorial is going to cover how to use the InputStream.transferTo(), a new method that has been added to the InputStream class from Java 9, to copy data from input streams to output streams in Java. 2…. Continue Reading →
This quick tutorial is going to cover about private interface methods in Java 9. 1. Overview As you may know, from Java 8, interfaces can have default methods which enable us to add new functionality to the interfaces of our libraries… Continue Reading →
© 2025 HowToProgram — Powered by WordPress
Theme by Anders Noren — Up ↑