Package private \ get \ set

 

 

 

 

 

the setXXX () accepts an object sent, the user parameters.

getXXX () retrieves from the user's private variables.

 

Example:

           

 

 result:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

 the this. distinguish the user if the local variable variable variable member and the same situation. this.XX local variable that represents XX XX variables in this method.

Example:

 

Guess you like

Origin www.cnblogs.com/gxtoo/p/12239480.html