Content deleted Content added
No edit summary |
Pinkshrimp (talk | contribs) Reverted 3 edits by 111.221.54.73 (talk). (TW) |
||
Line 1:
A '''
In [[class-based programming]], methods are defined in a [[class (computer science)|class]], and objects are instances of a given class. One of the most important capabilities that a method provides is method overriding. The same name (e.g., <code>area</code>) can be used for multiple different kinds of classes. This allows the sending objects to invoke behaviors and to delegate the implementation of those behaviors to the receiving object. Method in Java programming sets the behaviour of class object. For example, an object can send an <code>area</code> message to another object and the appropriate formula is invoked whether the receiving object is a <code>rectangle</code>, <code>circle</code>, <code>triangle</code>, etc.
|