[Logo]
Forums Register Login
Need Clarification for Overriding concept.
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!!!
dinesh.
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.
Die Fledermaus does not fear such a tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database


This thread has been viewed 1043 times.

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2019 10:51:05.