Latest

Oct
14
Algebraic Data Types (ADTs) in Java

Algebraic Data Types (ADTs) in Java

Algebraic Data Types can be built using sealed classes.
2 min read
Oct
11
When to Choose Composition Over Inheritance

When to Choose Composition Over Inheritance

Choose composition for code reuse that doesn't require a class hierarchy.
3 min read
Oct
10
When to Choose Inheritance Over Composition

When to Choose Inheritance Over Composition

Inheritance is best used for code reuse when modeling data.
3 min read
Oct
09
Java Class Layout Standard

Java Class Layout Standard

Standard layout each class should follow.
2 min read
Oct
08
Structure of a Java Source File

Structure of a Java Source File

The structure every Java source file must follow.
1 min read
Oct
07
Constructors vs Initializers in Java

Constructors vs Initializers in Java

Constructors are called when creating an instance of a class, whereas initializers are called regardless of the constructor.
3 min read
Oct
04
Record Patterns in Java

Record Patterns in Java

Pattern matching specific for record types.
3 min read
Oct
03
Pattern Matching Using Switch in Java

Pattern Matching Using Switch in Java

Pattern matching is both supported in switch statements and switch expressions.
3 min read
Oct
02
Inheritance vs Composition

Inheritance vs Composition

Inheritance is where a class inherits from another class, whereas composition is a class instance inside another class.
2 min read
Oct
01
Pattern Matching Using the instanceof Operator in Java

Pattern Matching Using the instanceof Operator in Java

Pattern matching using instanceof allows you to define pattern variables, simplifies code, and avoids ClassCastExceptions.
2 min read