Kotlin Dependency Injection with Kodein 1. Overview In this article, we’ll introduce Kodein — a pure Kotlin dependency injection (DI) framework — and compare it with other popular DI frameworks. 2. Dependency First, let’s add the Kodein dependency to our pom.xml: <dependency> <groupId>com.github.salomonbrys.kodein</groupId> <artifactId>kodein</artifactId> <version>4.1.0</version> </dependency> Please note that the… Continue Reading kotlin-kodein-dependency-injection

Intersection Between two Integer Arrays 1. Overview In this quick tutorial, we’ll have a look at how to compute the intersection between two Integer arrays ‘a’ and ‘b’. We’ll also focus on how to handle duplicate entries. For the implementation, we’ll use Streams. 2. Membership Predicate for an Array The intersection… Continue Reading java-array-intersection

CyclicBarrier in Java 1. Introduction CyclicBarriers are synchronization constructs that were introduced with Java 5 as a part of the java.util.concurrent package. In this article, we’ll explore this implementation in a concurrency scenario. 2. Java Concurrency – Synchronizers The java.util.concurrent package contains several classes that help manage a set of… Continue Reading java-cyclic-barrier

Static Code Analysis in Java Static Code Analysis is a method of analyzing the source code of programs without running them. It can discover formatting problems, null pointer dereferencing, and other simple scenarios. So, let’s jump into it. >> Introduction to Code Quality Metrics An overall look on some of… Continue Reading java-static-code-analysis-tutorial