Java – Write to File

2021 VietMX 0

1. Overview In this tutorial, we’ll explore different ways to write to a file using Java. We’ll make use of BufferedWriter, PrintWriter, FileOutputStream, DataOutputStream, RandomAccessFile, FileChannel, and the Java 7 Files utility class. We’ll also look […]

Java – Create a File

2021 VietMX 0

1. Overview In this quick tutorial, we’re going to learn how to create a new File in Java – first using the Files and Path classes from NIO, then […]

Spring Data Java 8 Support

2021 VietMX 0

1. Overview Spring Data now supports core Java 8 features – such as Optional, Stream API and CompletableFuture. In this quick article, we’ll go through some examples of how […]

Java 8 Streams peek() API

2021 VietMX 0

1. Introduction The Java Stream API introduces us to a powerful alternative for processing data. In this short tutorial, we’ll focus on peek(), an often misunderstood method. 2. […]

Java 8 Predicate Chain

2021 VietMX 0

1. Overview In this quick tutorial, we’ll discuss different ways to chain Predicates in Java 8. 2. Basic Example First, let’s see how to use a simple Predicate to filter a List of […]

Introduction to Spliterator in Java

2021 VietMX 0

1. Overview The Spliterator interface, introduced in Java 8, can be used for traversing and partitioning sequences. It’s a base utility for Streams, especially parallel ones. In this article, […]