Shape Shape

Null Object Pattern

Null Object Pattern is a design pattern where a null object behaves as a default object to avoid null reference errors. Used in software development to simplify code and avoid exceptions.

Example:

A program returns a null object instead of throwing an error when data is missing.

WhatsApp Icon