File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes What are the rules for using 'super' keyword ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What are the rules for using Watch "What are the rules for using New topic
Author

What are the rules for using 'super' keyword ?

ashwin bhawsar
Ranch Hand

Joined: Mar 16, 2011
Posts: 62

What are the rules/restructions/scenarios for how & where we can and cannot use the 'super' keyword.
shaileshkumar mistry
Greenhorn

Joined: Dec 19, 2011
Posts: 19

can
super.<method_Name>() is used to call a method of super class.
super keyword can be use to call the constructor of the superclass in the base class.


can't
super keyword can not be used inside static methods.


Thanks and Regards

OCPJP 100%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What are the rules for using 'super' keyword ?