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
Can a class have multiple constructors?
Can we overload destructor in java?
what is recursion in java
How do you start a new line in java?
What is a priority queue java?
What is a nested list?
List types of storage classes in java?
What is the properties class in java programming?
How many types of voids are there?
How to perform selection sort in java?
Difference between predicate, supplier and consumer ?
How many types of equations are there?
Can we have multiple classes in single file ?
What function extracts specified characters from a string?
Given a singly linked list, determine whether it contains a loop or not without using temporary space?