File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Need Clarification for Overriding concept. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Need Clarification for Overriding concept." Watch "Need Clarification for Overriding concept." New topic

Need Clarification for Overriding concept.

dinesh Venkatesan
Ranch Hand

Joined: Oct 12, 2006
Posts: 134
Hi All,

Please look at the following statements. I have taken this from Java Language Specification.

A class C inherits from its direct superclass and direct superinterfaces all non-private methods (whether abstract or not) of the superclass and superinterfaces that are public, protected or declared with default access in the same package as C and [BOLD]are neither overridden nor hidden by a declaration in the class.[/BOLD]

I am not able to get the concept clearly for the text mentioned bold.
Can anybody help me?

Thanks in Advance!!!
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15047

So what is exactly your question - do you want to know what "overriding" means?

Overriding means that you write a method in a subclass that has the same signature (same name and same parameter types) as a method in its superclass. For example:

If class Sub did not have an implementation of someMethod(String), it would inherit the method from class Super.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Need Clarification for Overriding concept.
It's not a secret anymore!