Difference between this() and super() methods?

  • Oct 25, 2020
  • 1
  • 1.7k

Bifference between this() and super() methods?

Answers (1)
Answer Accepted

Difference between this() and super() methods?

this() super()
It represents the current instance of a class. It represents the current instance of a parent class.
It is used to access methods of a current class. It is used to access methods of a parent class.
It also used to call the default constructor of a same class. It is used to call the default constructor of the parent class.

For Java Tutorial,

Java Tutorial

For more Core Java Interview Questions and Answer,

Top 50 Core Java Interview Questions and Answers

Submit your answer