this
2 tutorials tagged “this”.
- Constructor Overloading and Constructor ChainingGive a class several constructors, then chain them with this(...) so all setup and validation lives in one place. Also super(...), and the recursive-call error.
- Java This KeywordWhat this refers to, and its five uses: fields vs parameters, calling another constructor, passing and returning the current object.