IS method overriding is Duplication of Methods?
Answer Posted / amol
No. In method overriding the behaviour of overrided method
is different. The subclass override only those methods,
which has different behaviour than superclass else alawys
use all the methods of superclass, which is better than
making a lot duplication by defining another class for same
methods of superclass.
Is This Answer Correct ? | 29 Yes | 1 No |
Post New Answer View All Answers
Which list is sorted in java?
Define the term string pool?
How many types of exception can occur in a java program?
What is jar?
Is arraylist ordered in java?
What is character in data type?
What is an example of a keyword?
what is the constructor and how many types of constructors are used in java?
What are methods and how are they defined?
Explain spliterator in java8?
Can a class be declared as protected?
What is a variable and constant?
What is the use of singleton?
What is singleton class in java and how can we make a class singleton?
What are the advantages of exception handling in java?