Java

Articles on the Java programming language.
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
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
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
Sep
30
Anonymous Classes in Java

Anonymous Classes in Java

Anonymous classes are unnamed implementations of a class.
3 min read
Sep
27
Sealed Classes in Java

Sealed Classes in Java

Sealed classes and interfaces allow you to restrict who can extend or implement them.
4 min read
Sep
26
Exceptions vs Errors in Java

Exceptions vs Errors in Java

Exceptions are programming errors or recoverable errors, whereas an Error is something that isn't recoverable.
1 min read