| |||||||||
In object oriented terminology a message is the single means to pass control to an object. If the object 'responds' to the message, it has a method for that message. The equivalent in conventional (procedural, imperative or problem oriented) programming languages to a message is the function call. Note that message neither means the function as it is nor the signature of the function (ie. formal parameters plus name), but to 'send the message' means to 'call the function'.
Sending the same message to an object twice will usually result in the object to apply the method twice. Two messages are considered to be the same message, if the name and the arguments of the message are identical.
Objects can send messages to other objects from within their method bodies. In most languages that support object orientation however, the sender of a message can be code that doesn't belong to any specific object as well.
Some languages support the forwarding or delegation of messages from one object to another if the former has no method to handle the message, but 'knows' another object that may have one.