In several introductory texts on Object-oriented programming, I\'ve come across the above statement.
From wikipedia, \"In OOP, each object is capable of receivi
What you have posted will not compile in any oop language, as methodB
does not belong to object A
and methodA
doesn't belong to object B
.
If you called the correct method, then both of these are message passing by object C
:
a.methodA();
b.methodB();
From wikipedia:
The process by which an object sends data to another object or asks the other object to invoke a method.