✏️ Explanatory Question

What is Message Passing in OOP and why is it beneficial?

👁 29 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

In OOP, objects communicate by sending messages (method calls).

Benefits:

  • Loose coupling

  • Flexible design

  • Easy modification without affecting other parts

Example:
obj.display() → object receives a message to run its display method.