ThreadPoolTaskExecutor corePoolSize vs. maxPoolSize

2021 VietMX 0

1. Overview The Spring ThreadPoolTaskExecutor is a JavaBean that provides an abstraction around a java.util.concurrent.ThreadPoolExecutor instance and exposes it as a Spring org.springframework.core.task.TaskExecutor. Further, it is highly configurable through the […]

The Thread.join() Method in Java

2021 VietMX 0

1. Overview In this tutorial, we’ll discuss the different join() methods in the Thread class. We’ll go into the details of these methods and some example code. Like the wait() and notify() methods, join() is […]

Runnable vs. Callable in Java

2021 VietMX 0

1. Overview Since the early days of Java, multithreading has been a major aspect of the language. Runnable is the core interface provided for representing multi-threaded tasks […]

How to Kill a Java Thread

2021 VietMX 0

1. Introduction In this brief article, we’ll cover stopping a Thread in Java – which is not that simple since the Thread.stop() method is deprecated. As explained in this update from […]

Overview of the java.util.concurrent

2021 VietMX 0

1. Overview The java.util.concurrent package provides tools for creating concurrent applications. In this article, we will do an overview of the whole package. 2. Main Components The java.util.concurrent contains […]

Number Formatting in Java

2021 VietMX 0

1. Overview In this tutorial, we’ll look at different approaches to number formatting in Java and how to implement them. 2. Basic Number Formatting with String#format […]

Java 14 Record Keyword

2021 VietMX 0

1. Introduction Passing immutable data between objects is one of the most common, but mundane tasks in many Java applications. Prior to Java 14, this […]

Comparing Long Values in Java

2021 VietMX 0

1. Overview In this short tutorial, we’ll discuss different ways to compare two Long instances. We emphasize the problems that arise when using the reference comparison operator […]