ExecutorService in Java

ExecutorService in Java is an interface that is part of the java.util.concurrent package. This Java concurrency utility helps to execute asynchronous tasks concurrently. Using the ExecutorService interface, we can separate the task creation and task execution process. It is a subinterface of the ExecutorFramework. In this tutorial, we will discuss …

Read more

Java Concurrency utilities

The java.util.concurrent package contains various Java concurrency utilities that provide various classes for multithreading. This package is present from Java 5 onwards. Prior to this, the user has to create their own utilities for developing concurrent applications. In this tutorial, we will see an overview of all the Java concurrency …

Read more

Deadlock in Java

What is the deadlock situation in Java? In a multithreading environment, there are many chances for a Java deadlock situation to occur. In this tutorial, we will see how to detect and avoid a deadlock situation in Java. A deadlock occurs when two threads wait for each other infinitely and …

Read more

ThreadLocal in Java

ThreadLocal in Java ThreadLocal is a Java concurrency technique where each thread has its own variables. In other words, if multiple threads read the same code, they cannot read and write on each other thread’s local variables. This means that each thread can read and write only its own variables. …

Read more

Runtime class in Java

Runtime class in Java The Java Runtime class is part of the java.lang.Runtime package and has several built-in methods to interact with the runtime environment of the Java application. Every java application has only 1 instance of the Runtime class. The Runtime class provides various information about the application that …

Read more

Translate ยป