What is the difference between this and super keywords?

Entry Java

Answer

this: Refers to current instance.
super: Refers to parent class.
Used to call parent constructors and resolved naming conflicts.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice