Jump to content

Overload (programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Glasnt (talk | contribs) at 04:26, 19 July 2006 (creating article.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

To overload a method in programming is to have two or more methods with the same name, but are distingished by the number of variables they require.

For example, doTask() and doTask(object O) are overloaded methods. To call the latter, an object must be passed as a parameter, whereas the former does not require a parameter, and is called with an empty parameter field.