In object-oriented programming, a function that can be called on an object of a given class. When a method is called (or invoked) on an object, the object is passed as an implicit argument to the method, usually referred to by the special variable "this". If the method is not defined in the object's class, it is looked for in that class's superclass, and so on up the class hierarchy until it is found. A subclass thus inherits (inheritance) all the methods of its superclasses.
Methods are sometimes called "object methods" or "instance methods". "Class methods" are methods that operate on objects of class "class". "Static methods" are not methods but normal functions packaged with the class.