A Guide to the Java ExecutorService

2021 VietMX 0

1. Overview ExecutorService is a JDK API that simplifies running tasks in asynchronous mode. Generally speaking, ExecutorService automatically provides a pool of threads and an API for assigning […]

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 […]

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 […]

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 […]

The XOR Operator in Java

2021 VietMX 0

1. Overview In this short tutorial, we’re going to learn about the Java XOR operator. We’ll go through a bit of theory about XOR operations, and then we’ll see […]