java learning day8 - this keyword

this keyword

    this is a quote , is a variable , stored in the heap memory in.

 

    No static modification of the method is called an instance method

 

    No static modification of variables are called instance variables , instance variables must be referenced. Accessible way.

 

    this can occur in the example method, this object is directed to perform the action.

 

    can not with this static method of use.

·

    In most cases this may be omitted. When the distinction between local variables and instance variables when not omitted

 

    this purpose:

      It may be used in the example method , the representative of the current object. [Syntax: this.]

      Can be used in the constructor , the constructor call another constructor by the current [syntax: this (argument)],

      However, the method must be in the configuration of the first row.

      

 

Guess you like

Origin www.cnblogs.com/javaisbest/p/11587950.html