We can plug and unplug any electrical appliances in sockets. Even though nothing is plugged in, the wall doesn’t explode

With software, however, a client often expects a service to be available. If the service was removed, we get a NullReferenceException. To deal with this type of situation, we can create an implementation of an interface that does “nothing.” This is a design pattern known as Null Object.

Share Button

Leave a Reply

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

Post Navigation