• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

super keyword

 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your method overrides one of its superclass's methods, you can invoke the overridden method through the use of the keyword super.

Q1) In below example why we are able use super keyword to invoke super class version of overloaded method ?






 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4259
227
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
amolpalekar kadolkar wrote:If your method overrides one of its superclass's methods, you can invoke the overridden method through the use of the keyword super.

Yes, but you can use that keyword to call any accessible method in the super class, despite it was overridden or not.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic