Bubble Sort in Java
1. Introduction In this quick article, we’ll explore the Bubble Sort algorithm in detail, focusing on a Java implementation. This is one of the most straightforward sorting algorithms; the core idea...
View ArticleJava Weekly, Issue 199
Lots of interesting writeups on Java 9 this week. Here we go… 1. Spring and Java >> Migrating a Spring Boot application to Java 9 – Compatibility [blog.frankel.ch] An interesting case study...
View ArticleCommits and NRT Search in SolrCloud
1. Overview Solr is one of the most popular Lucene-based search solutions. It’s fast, distributed, robust, flexible and has an active developer community behind it. SolrCloud is the new, distributed...
View ArticleSpring MVC Guides
The Spring MVC project provides tools that can be used for fast development of web applications in the MVC architecture. >> Spring MVC Tutorial Starting at the top – this is a simple Spring MVC...
View ArticleA Guide to Java Bytecode Manipulation with ASM
1. Introduction In this article, we’ll look at how to use the ASM library for manipulating an existing Java class by adding fields, adding methods, and changing the behavior of existing methods. 2....
View ArticleMathematical and Aggregate Operators in RxJava
1. Introduction Following the introduction to RxJava article, we’re going to look at aggregate and mathematical operators. These operations must wait for the source Observable to emit all items....
View ArticleMapping Nested Values with Jackson
1. Overview A typical use case when working with JSON is to perform a transformation from one model into another. For example, we might want to parse a complex, densely nested object graph into a more...
View ArticleHow to Calculate Levenshtein Distance in Java?
1. Introduction In this article, we describe the Levenshtein distance, alternatively known as the Edit distance. The algorithm explained here was devised by a Russian scientist, Vladimir Levenshtein,...
View ArticleJava Weekly, Issue 200
Let’s jump right in. 1. Spring and Java >> Enabling Two-factor Authentication For Your Web Application [techblog.bozho.net] A quick and practical example of a 2FA implementation with Spring....
View ArticleA Guide to the Static Keyword in Java
1. Introduction In this article, we’ll explore the static keyword of the Java language in detail. We’ll find how we can apply keyword static to variables, methods, blocks, nested classes and what...
View ArticleQuick Guide to Micrometer
1. Introduction Micrometer provides a simple facade over the instrumentation clients for a number of popular monitoring systems. Currently, it supports the following monitoring systems: Atlas,...
View ArticleSpring Data JPA – Adding a Method in All Repositories
1. Overview Spring Data makes the process of working with entities a lot easier by merely defining repository interfaces. These come with a set of pre-defined methods and allow the possibility of...
View ArticleInitializing Arrays in Java
1. Overview In this quick tutorial, we’re going to see the different ways in which we can initialize an array and the subtle differences between these. 2. One Element at a Time Let’s start with a...
View ArticleIntroduction to BouncyCastle with Java
1. Overview BouncyCastle is a Java library that complements the default Java Cryptographic Extension (JCE). In this introductory article, we’re going to show how to use BouncyCastle to perform...
View ArticleIntroduction to Apache Spark
1. Introduction Apache Spark is an open-source cluster-computing framework. It provides elegant development APIs for Scala, Java, Python, and R that allow developers to execute a variety of...
View ArticleMocking Void Methods with Mockito
1. Overview In this short tutorial, we focus on mocking void methods with Mockito. As with other articles focused on the Mockito framework (like Mockito Verify, Mockito When/Then, and Mockito’s Mock...
View ArticleMockito and JUnit 5 – Using ExtendWith
1. Introduction In this quick article, we’ll show how to integrate Mockito with the JUnit 5 extension model. To learn more about the JUnit 5 extension model, have a look at this article. First, we’ll...
View ArticleIntro to JDO Queries 2/2
1. Overview In the previous article in this series, we showed how to persist Java objects to different data stores. For more details, please check Guide to Java Data Objects. JDO supports different...
View ArticleDynamic Mapping with Hibernate
1. Introduction In this article, we’ll explore some dynamic mapping capabilities of Hibernate with the @Formula, @Where, @Filter and @Any annotations. Note that although Hibernate implements the JPA...
View ArticleDaemon Threads in Java
1. Overview In this short article, we’ll have a look at daemon threads in Java and see what can they be used for. We’ll also explain the difference between daemon threads and user threads. 2....
View Article