intermediateCore Java Fundamentals28 of 436
Difference between this and super keywords.
Tests whether you know this refers to the current object instance (used for disambiguating fields/constructor chaining within the class), while super refers to the immediate parent class (used to access parent members or invoke the parent constructor) -- and that both must be the first statement when chaining constructors.
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response