What is the purpose of the Null Object pattern?

  • To create objects with complex behavior
  • To define a default behavior for an object
  • To replace null references with meaningful objects
  • To validate user input
The Null Object pattern aims to replace null references with objects that have a defined behavior, avoiding runtime errors.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *