Why is a Java Semaphore useful? Today I’ll tell you the four reasons why a Java Semaphore is useful.
When attempting to retrieve a value from a Map which doesn’t exist, often it is desirable for the Map to provide an initial value. This saves the developer adding in extra logic to detect, create and insert the initial value. Java 8 adds a new Map method… [Read more…]
Providing a good implementation of
java.lang.Object::hashCode, is essential to HashMap performance.
This tutorial, complete with a source code visualization, describes how HashMap performance can be improved…
The Java collection class,
java.util.HashMap enables the storage of Key Value pairs. Given a Key, the HashMap enables the associated Value to be efficiently retrieved.
This tutorial, complete with an easy to understand UML visualization, explains how HashMap works.
Concurrency in non-trivial systems is difficult.
java.util.concurrent. CountDownLatch is one of my favourite concurrent core Java classes, because it simplifies the synchronization of threads. This class is useful when you want to wait until some task in another thread completes, before continuing in the current thread.
Wonder how it all works? Welcome to the Codelytics’ Blog – you’ll find posts here that will demystify the inner workings of some of your favourite Java open source products.