|
|
Home J2EE Concepts JMS Java Language Contact Back Next Bookmark this Page |
Some useful tips related to:
|
Method OverridingIn Java, when a superclass & subclass method have same signature, then the method in the subclass will override the method in its parent class. When such overridden method is called from a subclass, Java will execute the method defined by the subclass. The version of the method defined by the superclass will be shadowed.
Consider following example:
class demo{ |
|
|
|