In OOP

Object not having to know who is handling the message, only what the message is.

When we use message passing in OOP?

  • When one object needs to request data from another object
  • When one object needs to notify another object (or group of objects) of an event
  • When multiple objects need to collaborate to achieve a common goal
  • When one object needs to delegate responsibility to another object
  • When one object needs to control the behavior of another object
  • When one object needs to communicate with other objects in a concurrent system