Methods

A method (procedural code) implements an aspect of the behavior of an object. Methods constitute the procedural interface of an object. An object can invoke methods of another object, by sending that object a message.

Objects cannot perform any action by themselves. You use methods to send messages to objects to perform the appropriate actions.

A method may require parameters, and may return a result. The method that is executed is determined at run time, based on the class of the object to which the message is sent.

Methods can also be public or protected. Public (and read-only) features represent the interface of an object or the set of services the object provides to other objects in the system.

For details about defining your own methods, see "Defining and Compiling JADE Methods and Conditions", in Chapter 4.