Uses of super keyword in Java OOP language

What are the uses of super keyword in Java programming language?

  • Rahul
  • 13 Jul 2018
  • 1142 Views
  • 1 Answer
Your Answer

Super keyword can be used in three different context in java.

1) if used with a class ,it marks the end 
    of inheritance chain that is you won't         be able to extend that class further.

2) if used in a constructor or a method it      is used to call the constructor/method      of the base class in the extended              class.


3) if used with the method ,the method         cannot be overloaded then,it is used if     you do not want a method behavior to     change by anyone make it super.

Object Oriented Programming

Didn't get the answer.
Contact people of Talent-Object Oriented Programming directly by clicking here