Custom Thread Pools In Java 8 Parallel Streams 1. Overview Java 8 introduced the concept of Streams as an efficient way of carrying out bulk operations on data. And parallel Streams can be obtained in environments that support concurrency. These streams can come with improved performance – at the cost… Continue Reading java-8-parallel-streams-custom-threadpool

Guide to ThreadLocalRandom in Java 1. Overview Generating random values is a very common task. This is why Java provides the java.util.Random class. However, this class doesn’t perform well in a multi-threaded environment. In a simplified way, the reason for poor performance of Random in a multi-threaded environment is due… Continue Reading java-thread-local-random

Java Concurrency Interview Questions (+ Answers) 1. Introduction Concurrency in Java is one of the most complex and advanced topics brought up during technical interviews. This article provides answers to some of the interview questions on the topic that you may encounter. Q1. What Is the Difference Between a Process… Continue Reading java-concurrency-interview-questions

Guide to java.util.concurrent.Locks   1. Overview Simply put, a lock is a more flexible and sophisticated thread synchronization mechanism than the standard synchronized block. The Lock interface has been around since Java 1.5. It’s defined inside the java.util.concurrent.lock package and it provides extensive operations for locking. In this article, we’ll… Continue Reading java-concurrent-locks