What is the significance of the “super” and “this” keywords in Java?
Answer»
super keyword: In Java, the “super” keyword is used to provide reference to the INSTANCE of the PARENTCLASS(superclass). Since it is a reserved keyword in Java, it cannot be used as an identifier. This keyword can also be used to invoke parent class members like constructors and methods.
this Keyword: In Java, the “this” keyword is used to REFER to the instance of the current class. Since it is a reserved keyword in Java, it cannot be used as an identifier. It can be used for referring object of the current class, to invoke a constructor of the current class, to pass as an argument in the method call or constructor call, to RETURN the object of the current class.