Efficiently Merge Sorted Java Sequences
1. Overview In this short tutorial, we'll see how we can efficiently merge sorted arrays using a heap. 2. The Algorithm Since our problem statement is to use a heap to merge the arrays, we'll use a...
View ArticleJava Weekly, Issue 315
1. Spring and Java >> Manage multiple Java SDKs with SDKMAN! with ease [blog.codeleak.pl] A good intro to this handy tool for installing and switching between multiple versions of Java, Maven,...
View ArticleGet String Value of Excel Cell with Apache POI
1. Overview A Microsoft Excel cell can have different types like string, numeric, boolean, and formula. In this quick tutorial, we'll show how to read the cell value as a string – regardless of the...
View ArticlePartitioning and Sorting Arrays with Many Repeated Entries
1. Overview The run-time complexity of algorithms is often dependent on the nature of the input. In this tutorial, we’ll see how the trivial implementation of the Quicksort algorithm has a poor...
View ArticleAsynchronous Programming in Java
1. Overview With the growing demand for writing non-blocking code, we need ways to execute the code asynchronously. In this tutorial, we'll look at a few ways to achieve asynchronous programming in...
View ArticleGenerating Random Numbers
1. Overview In this tutorial, we'll explore different ways of generating random numbers in Java. 2. Using Java API The Java API provides us with several ways to achieve our purpose. Let’s see some of...
View ArticleIntro to OpenCV with Java
1. Introduction In this tutorial, we'll learn how to install and use the OpenCV computer vision library and apply it to real-time face detection. 2. Installation To use the OpenCV library in our...
View ArticleJava Weekly, Issue 320
1. Spring and Java >> Java 14 Feature Spotlight: Records [infoq.com] A deep dive into the records preview feature with Java Language Architect Brian Goetz. >> Multitenancy Applications with...
View ArticleSpring Projects Version Naming Scheme
1. Overview It is common to use Semantic Versioning when naming release versions. For example, these rules apply for a version format such as MAJOR.MINOR.REVISION: MAJOR: Major features and potential...
View ArticleBreaking YAML Strings Over Multiple Lines
1. Overview In this article, we'll learn about breaking YAML strings over multiple lines. In order to parse and test our YAML files, we'll make use of the SnakeYAML library. 2. Multi-Line Strings...
View ArticleAdd Build Properties to a Spring Boot Application
1. Introduction Usually, our project's build configuration contains quite a lot of information about our application. Some of this information might be needed in the application itself. So, rather than...
View ArticleThe Java Headless Mode
1. Overview On occasion, we need to work with graphics-based applications in Java without an actual display, keyboard, or mouse, let's say, on a server or a container. In this short tutorial, we're...
View ArticleMongoDB Aggregations Using Java
1. Overview In this tutorial, we'll take a dive into the MongoDB Aggregation framework using the MongoDB Java driver. We'll first look at what aggregation means conceptually, and then set up a dataset....
View ArticleThe BeanDefinitionOverrideException in Spring Boot
1. Introduction The Spring Boot 2.1 upgrade surprised several people with unexpected occurrences of BeanDefinitionOverrideException. It can confuse some developers and make them wonder about what...
View ArticleJenkins Slack Integration
1. Overview When our teams are responsible for DevOps practices, we often need to monitor builds and other automated jobs. In this tutorial, we'll see how to configure two popular platforms, Jenkins...
View ArticleDesign Patterns in the Spring Framework
1. Introduction Design patterns are an essential part of software development. These solutions not only solve recurring problems but also help developers understand the design of a framework by...
View ArticleCache Headers in Spring MVC
1. Overview In this tutorial, we'll learn about HTTP caching. We'll also look at various ways to implement this mechanism between a client and a Spring MVC application. 2. Introducing HTTP Caching When...
View ArticleHow to Handle Java SocketException
1. Introduction In this tutorial, we'll learn the causes of SocketException with an example. We’ll also discuss how to handle the exception. 2. Causes of SocketException The most common cause of...
View ArticleArrays.deepEquals
1. Overview In this tutorial, we'll dive into the details of the deepEquals method from the Arrays class. We'll see when we should use this method, and we'll go through some simple examples. To learn...
View ArticleIntro to OpenCV with Java
1. Introduction In this tutorial, we'll learn how to install and use the OpenCV computer vision library and apply it to real-time face detection. 2. Installation To use the OpenCV library in our...
View Article