method

In object-oriented computing, a method is an operation that can be applied to an object. When a particular method is applied to a particular object, the characteristics of the object may determine what that operation means for that object. A method for a particular type of object is usually implemented as a procedure, and when the method is applied, the appropriate procedure is be called. Associating a procedure to a particular method for a particular object is called binding. There may be enough information known at compile-time to make the association, which yields better performance. Some languages provide a special word, often "method", that both define a procedure and associates it with a particular method for a particular object or type of object. In a language that provides object-oriented constructs at compile-time the association part of the definition of a class (early binding). In a dynamic language, the association is made when a class or instance is instantiated (late binding).

It is common to see description of an object "doing something", e.g. "calculating its own area". This is incorrect terminology. An object is data, and as such, doesn't "act" or "behave". together with a specification of the algebra that is applicable to the object. It is the program that acts, and that models behaviour by applying operations to an object.

method is a procedure available inside object definition contexts in various OO extensions: