Guide to Guava MinMaxPriorityQueue and EvictingQueue
1. Overview In this article, we’ll be looking at the EvictingQueue, and MinMaxPriorityQueue constructs from the Guava library. The EvictingQueue is an implementation of the circular buffer concept....
View ArticleSplit a String in Java
1. Introduction Splitting Strings is a very frequent operation; this quick tutorial is focused on some of the API we can use to do this simply in Java. 2. String.split() Let’s start with the core...
View ArticleIntroduction to Java Serialization
1. Introduction Serialization is the conversion of the state of an object into a byte stream; deserialization does the opposite. Stated differently, serialization is the conversion of a Java object...
View ArticleGuide to Mathematical Operations with Guava
1. Overview In this article, we will see some useful Mathematical Operations available in the Guava Library. There are four maths utility classes available with Guava: IntMath – operation on int...
View ArticleHow to Remove the Last Character of a String?
1. Overview In this quick article, we are going to check and discuss different techniques for removing the last character of a String. 2. Using String.substring() The easiest way is to use the...
View ArticleDifference Between “==” and “===” operators in Kotlin
1. Overview In this article, we are going to talk about the difference between “==” and “===” operators in Kotlin. In Kotlin, just like in Java, we have two different concepts of equality, Referential...
View ArticleGuide to Synchronized Keyword in Java
1. Overview This quick article will be an intro to using the synchronized block in Java. Simply put, in a multi-threaded environment, a race condition occurs when two or more threads attempt to update...
View ArticleIntroduction to Drools
1. Overview Drools is a Business Rule Management System (BRMS) solution. It provides a rule engine which processes facts and produces output as a result of rules and facts processing. Centralization...
View ArticleJava Web Weekly, Issue 177
Lots of interesting writeups on Java 9 this week. Here we go… 1. Spring and Java >> Is Jigsaw Dead? Not quite. [tomitribe.com] A very needed clarification of the JCP process and what has...
View ArticleSoftware Transactional Memory in Java Using Multiverse
1. Overview In this article, we’ll be looking at the Multiverse library – which helps us to implement the concept of Software Transactional Memory in Java. Using constructs out of this library, we can...
View ArticleIntroduction to HikariCP
1. Overview In this introductory article, we’ll learn about the HikariCP JDBC connection pool project. This is a very lightweight (at roughly 130Kb) and lightning fast JDBC connection pooling...
View ArticleGuide to Spring Web Flow
1. Overview Spring Web Flow builds on Spring MVC and allows implementing flows within a web application. It’s generally used for creating sequences of steps that guide users through a process or some...
View ArticleComparing getPath(), getAbsolutePath(), and getCanonicalPath() in Java
1. Overview The java.io.File class has three methods — getPath(), getAbsolutePath() and getCanonicalPath() — to obtain the filesystem path. In this article, we’ll have a quick look at the differences...
View ArticleIntroduction to Mustache
1. Overview In this article, we’ll focus on Mustache templates and use one of its Java APIs for producing dynamic HTML content. Mustache is a logicless template engine for creating dynamic content...
View ArticleMultiple Authentication Providers in Spring Security
1. Overview In this quick article, we’re going to focus on using multiple mechanisms to authenticate users in Spring Security. We’ll do that by configuring multiple authentication providers. 2....
View ArticleHow to Add a Single Element to a Stream
1. Overview In this quick article, we’re going to take a look at how to add an element to a Java 8 Stream which is not as intuitive as adding an element to a normal collection. 2. Prepending We can...
View ArticleSerenity BDD with Spring and JBehave
1. Introduction Previously, we have introduced the Serenity BDD framework. In this article, we’ll introduce how to integrate Serenity BDD with Spring. 2. Maven Dependency To enable Serenity in our...
View ArticleIterating over Enum Values in Java
1. Overview Enum in Java is a datatype that helps us assign a predefined set of constants to a variable. In this quick article, we’ll see different ways in which we can iterate over an enum in Java....
View ArticleSpring Remoting with JMS
1. Overview We saw in a previous article how Spring Remoting could be used to provide RPC on top of an asynchronous channel as an AMQP queue. However, we can obtain the same result using JMS too. In...
View ArticleTesting with Google Truth
1. Overview Truth is a fluent and flexible open-source testing framework designed to make test assertions and failure messages more readable. In this article, we’ll explore the key features of the...
View Article