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


Please Help Members By Posting Answers For Below Questions

Which list is sorted in java?

750


Define the term string pool?

775


How many types of exception can occur in a java program?

705


What is jar?

826


Is arraylist ordered in java?

765


What is character in data type?

732


What is an example of a keyword?

747


what is the constructor and how many types of constructors are used in java?

738


What are methods and how are they defined?

851


Explain spliterator in java8?

779


Can a class be declared as protected?

731


What is a variable and constant?

762


What is the use of singleton?

713


What is singleton class in java and how can we make a class singleton?

808


What are the advantages of exception handling in java?

821