<<< A constructor with one parameter | Index | Example of calling a constructor >>> |
The this keyword has meaning only within a class definition.
Four possible uses of the this keyword are:
// refer to an instance variable of the current object this.variableName // call another constructor of the same class this( argumentList ); // call a method of the current object this.methodName( argumentList ) // pass the current object to a method objectName.methodName( this ) // pass the current object to a static method ClassName.methodName( this )
<<< A constructor with one parameter | Index | Example of calling a constructor >>> |