aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes super keyword Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "super keyword " Watch "super keyword " New topic
Author

super keyword

Satyajeet Kadam
Ranch Hand

Joined: Oct 19, 2006
Posts: 202
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
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2691
    
    3

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.

Author of ExamLab (Download) - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
 
I agree. Here's the link: http://jrebel.com/download
 
subject: super keyword
 
Similar Threads
deciding method from which class to call depending upon parameter passed in
merge() operation in hibernate
Strange "this" behavior
Regarding Method Shadowing
Overloading & Overriding!