Facade Design Pattern

The Facade Design Pattern provides a unified interface to a set of interfaces in a subsystem. It defines a higher level interface that makes the subsystem easier to use.

January 15, 2020

Enumeration and Iterator in Java

Java has two ways to iterate over the elements of a collection - using an Enumeration and an Iterator. This post explains Enumeration and Iterators in Java.

January 7, 2020

Adapter Design Pattern

The Adapter Design Pattern converts an interface into another interface that the clients expect. It adapts an interface to look like a different interface.

December 30, 2019

Write CSV Files Using Apache Commons CSV

Apache Commons CSV is one of the components in the Apache Commons project. This post is on how to write CSV files using Apache Commons CSV.

December 24, 2019

Naive Benchmarking Framework in Java

In this post, let us build on our previous benchmarking attempt to arrive at a better but still a naive benchmarking framework in Java.

December 16, 2019

Measuring Code Execution Time - The Wrong Way

In this post, I explain the usual way in measuring the execution or running time of code in Java, what is wrong with it and why it shouldn’t be used.

December 10, 2019

Collectors toMap Duplicate Key

This post shows the Collectors toMap duplicate key exception and the changes made in Java 9 to improve the exception message to contain the value of the key.

December 2, 2019

Template Method Design Pattern

The Template Method Design Pattern defines the steps of an algorithm and allows subclasses to provide the implementation for one or more steps.

November 25, 2019

Optional – New methods in Java 9 through 11

Optional was added to Java 8. This post explains the new methods or APIs added to the Optional class in Java from Java 9 through 11 with examples.

November 18, 2019

A Complete Guide to Java Optional

Optional is a container object added to Java 8+ that is used as a wrapper over some value. It provides a mechanism to represent “no result” for a method.

November 11, 2019