Java Singleton – static final implementation
It is the simplest and most common implementation of Singleton Design Pattern in Java. In this post we’ll show how to implement it correctly and explain why it works.
Java CyclicBarrier is very convenient synchronization tool for writing concurrent simulations. In this post we’ll show how it works and write a game simulation.
SLF4J: Class path contains multiple SLF4J bindings error occurs in many projects, especially those having multiple dependencies. Here we the reason and how to deal with it!
SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder” is an error that people face very often. Here we show what is the reason and how to fix it!
Java Reverse String in 2 ways
Java String doesn’t have reverse method, so it may not be immediately apparent how to reverse a string in Java. Here are two ways do do it.
Insertion Sort in Java
Insertion Sort is another simple to understand and implement algorithm. Unlike Selection Sort it can work faster with certain data.
Selection Sort in Java
Selection Sort is one of many sorting algorithms, but unlike a few others it is easy to understand and implement as we’re going to show here!
The method Optional.map(Function) applies the given function to the optional value if it is present and returns an optional with the result or empty optional.
Binary Search algorithm in Java
Binary Search is the fastest algorithm for finding an element in a sorted list. Also it’s easy to implement what we’re going to show in this post.