Iteration vs. Recursion in Java
Iteration and recursion are exchangeable in most cases. In theory, every program can be rewritten to avoid iteration using recursion. However, it is important to know that when ...
Structural Design Patterns
These patters are about providing different ways to create a class structure with inheritance and composition. All Patterns Adapter Adapter pattern wraps a interface in...
Java Variables Initialization
There are two ways of initialize a field, eagerly and lazily. Lazy initialization is based on initializing the field when the value is needed, whereas the eager initialization i...
Java Optional Values
Before Java 8 there were only two possible ways to gracefully exit a method when a value is not present, either you return null or throw an exception. This has changed since Jav...