All posts by Java Development Journal

Java 9 REPL

Introduction to Java 9 REPL In this post, we will explore Java 9 REPL (Read-Evaluate-Print-Loop) feature or shortly called as JShell. Many modern languages provide a tool (Mostly called as REPL or scripting tool) for real-time statement interpretation. One benefit of such a tool is that you can easily test your code without creating a complete […]

Continue reading

Zipping and Unzipping in Java

Zipping and Unzipping in Java In this post, we will learn Zipping and Unzipping in Java using java.util.zip API. We will also discuss some third-party API to perform these tasks.  1.  Zip a File We will be performing a simple operation to zip a single file into an archive. public class ZipSingleFile { public static void main(String[] […]

Continue reading

Collection Factory Methods in Java 9

Collection Factory Methods in Java 9 In this post, we will explore Collection Factory Methods in Java 9. Java 9 introduced a new Convenience Factory Methods for Collections.   Introduction Creating a new unmodifiable list in Java (before Java 9) is not very clean. Creating a small immutable collection in Java involves following steps Create collection. […]

Continue reading

Java nio2

Introduction to Java NIO2 This post is aiming to provide a high-level overview of the Java NIO2 API features. Java7 introduced a rich set of features to operators on the Files using Java NIO2 package. In this post, we will learn about some of the basic features introduced by Java Nio2. The java.nio.file package provides a comprehensive support […]

Continue reading

Java NIO Path

Java7 Introduced NIO2 as an enhancement to the current File API. Java NIO Path and especially Path class was one of the main entry points for NIO2 API. Path class is a representation of the underlying platform file system.Path class will create a path based on the platform you are working on. (e.g. For Linux […]

Continue reading