Methods and backgammon game

Method: section of a fragment of code to accomplish a specific function, similar to the function of the other languages.

A method for faux pas features and functions of the class definition for the class or implemented. The method is an abstract class and an object behavior characteristics. The method is similar to the process-oriented functions. In object-oriented, the basic unit of the whole program is the class, method and object class is subordinate. The method includes a method name and parameters.

Invocation method:

1 in the form of parameters : When external method declaration for receiving incoming data

2. The argument data is actually transmitted when calling the methods of:

3. Return value : method returns data to the calling environment after it is finished

4 . Return Value Type : a pre-agreed value of return data type, such as non-return type, must show either void

Analysis exchange with corresponding memory two values:

 

Guess you like

Origin www.cnblogs.com/laurarararararara/p/11567499.html
Recommended