Composite Design pattern in Java 1. Introduction In this quick tutorial, we’ll introduce the composite design pattern in Java. We’re going to describe the structure and the purpose of its use. 2. The Structure The composite pattern is meant to allow treating individual objects and compositions of objects, or “composites” in… Continue Reading java-composite-pattern

How 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, in 1965. We’ll provide an iterative and a recursive Java implementation of this algorithm. 2.… Continue Reading java-levenshtein-distance

Introduction to Using FreeMarker in Spring MVC 1. Overview FreeMarker is a Java based template engine from the Apache Software Foundation. Like other template engines, FreeMarker is designed to support HTML web pages in applications following the MVC pattern. This tutorial illustrates how to configure FreeMarker for use in Spring… Continue Reading freemarker-in-spring-mvc-tutorial

Types of Strings in Groovy 1. Overview In this tutorial, we’ll take a closer look at the several types of strings in Groovy, including single-quoted, double-quoted, triple-quoted, and slashy strings. We’ll also explore Groovy’s string support for special characters, multi-line, regex, escaping, and variable interpolation. 2. Enhancing java.lang.String It’s probably good… Continue Reading groovy-strings