java methods in the property

Access specifier: access specifier visible range defined method, or the range of the method is called. Access control method for four symbols, the visible range by decreasing order is: public, protected, no access specifier, private. Where no access control characters are not written keywords. Specific range of the subsequent detailed description.

Formal parameters: means for receiving data inputted from the outside when the method is called.

Argument: the actual data passed to the method when calling the method.

Returns: method to return to the calling environment in its data after the implementation.

Return Value: a pre-agreed value of return data type, such as no return value must be given return type void.

Method signature: method name parameter list and methods ( energy difference method) ; // most critical

java language call the method: the object name the method name (argument list).

The number of actual parameters, and the order of data types and parameter list must match the called method declaration.

Run termination method return statement and specify the data to be returned.

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11130909.html