Two Laptop Bag
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply 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 ?
 
Similar Threads
Problems in Inheritence
how can we access a method from sub class from its super class?
SUPER?
java
java