Saturday, November 7, 2009

METHOD

In normal English method is some thing like the ways to achieve some thing. Same can be applied here. It is the operations performed on data. It will take input values and parameters through it, and may or may not return values of particular data type.

A method is some actions that can be performed by class or object.
Method is the function owned by your class.

A method is the function of the containing class.


Syntax of method:



type method_ name (parameter-list)
{
// body of the method
}

No comments:

Post a Comment