Selection Sort in Java
1. Introduction In this tutorial, we’ll learn Selection Sort, see its implementation in Java, and analyze its performance. 2. Algorithm Overview Selection Sort begins with the element in the 1st...
View Article@TestInstance Annotation in JUnit 5
1. Introduction Test classes often contain member variables referring to the system under test, mocks, or data resources used in the test. By default, both JUnit 4 and 5 create a new instance of the...
View ArticleMyBatis with Spring
1. Introduction MyBatis is one of the most commonly used open-source frameworks for implementing SQL databases access in Java applications. In this quick tutorial, we’ll present how to integrate...
View ArticleCalculating Logarithms in Java
1. Introduction In this short tutorial, we’ll learn how to calculate logarithms in Java. We’ll cover both common and natural logarithms as well as logarithms with a custom base. 2. Logarithms A...
View ArticleThe K-Means Clustering Algorithm in Java
1. Overview Clustering is an umbrella term for a class of unsupervised algorithms to discover groups of things, people, or ideas that are closely related to each other. In this apparently simple...
View ArticleHow an In-Place Sorting Algorithm Works
1. Introduction In this tutorial, we’ll explain how the in-place sorting algorithm works. 2. In-Place Algorithms The in-place algorithms are those that don’t need any auxiliary data structure in order...
View ArticleLinux Commands – Delete Files Older Than X
1. Overview We often need to tidy up files on our workstations or servers. Our applications may produce logs or temporary files. One common use case is to delete files that are above a certain age. In...
View ArticleHow Long a Linux Process Has Been Running
1. Overview Linux comes with a handful of monitoring tools which can help us to get some insight about the OS itself. The ps utility from the Procps package is one of those tools which can report some...
View ArticleJava Weekly, Issue 294
Here we go… 1. Spring and Java >> New language features since Java 8 [advancedweb.hu] The title says it all — and there’s a great section about the var keyword. >> Nuances of Overloading...
View ArticleJava String equalsIgnoreCase()
1. Overview In this tutorial, we’ll look at determining if two String values are the same when we ignore case. 2. Using the equalsIgnoreCase() equalsIgnoreCase() accepts another String and returns a...
View ArticleA Guide to SirixDB
1. Overview In this tutorial, we’ll give an overview of what SirixDB is and its most important design goals. Next, we’ll give a walk through a low level cursor-based transactional API. 2. SirixDB...
View ArticleInterpolation Search in Java
1. Introduction In this tutorial, we’ll walk through interpolation search algorithms and discuss their pros and cons. Furthermore, we’ll implement it in Java and talk about the algorithm’s time...
View ArticleDebugging with Eclipse
1. Overview In this quick guide, we’ll see how to debug Java programs using the Eclipse IDE. 2. Basic Concepts Eclipse has great support for debugging an application. It visualizes step-by-step...
View ArticleImplementing The OAuth 2.0 Authorization Framework Using Java EE
1. Overview In this tutorial, we’re going to provide an implementation for the OAuth 2.0 Authorization Framework using Java EE And MicroProfile. Most importantly, we’re going to implement the...
View ArticleCreating a Triangle with for Loops in Java
1. Introduction In this tutorial, we’re going to explore several ways to print a triangle in Java. We know that there are many types of triangles. However, we’re going to explore only a couple of them:...
View ArticleMemento Design Pattern in Java
1. Overview In this tutorial, we’ll learn what the Memento Design Pattern is and how to use it. First, we’ll go through a bit of theory. And then, we’ll create an example where we’ll illustrate the...
View ArticleFinding the Least Common Multiple in Java
1. Overview The Least Common Multiple (LCM) of two non-zero integers (a, b) is the smallest positive integer that is perfectly divisible by both a and b. In this tutorial, we’ll learn about different...
View ArticleValidating Lists in a Spring Controller
1. Introduction Validating user inputs is a common requirement in any application. In this tutorial, we’ll go over ways to validate a List of objects as a parameter to a Spring controller. We’ll add...
View ArticleJava Naming and Directory Interface Overview
1. Introduction The Java Naming and Directory Interface (JNDI) provides consistent use of naming and/or directory services as a Java API. This interface can be used for binding objects, looking up or...
View ArticleCalling Default Serializer from Custom Serializer in Jackson
1. Introduction Serializing our complete data structure to JSON using an exact one-on-one representation of all the fields may not be appropriate sometimes or simply may not be what we want. Instead,...
View Article