Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


IS method overriding is Duplication of Methods?

Answers were Sorted based on User's Feedback



IS method overriding is Duplication of Methods?..

Answer / 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

IS method overriding is Duplication of Methods?..

Answer / venkat

To understand the Question, one needs to know the scenarios
where in a method is overriden.
there are two cases:
you want to override a method:
1)when the super class doesnt know how to implement it, and
leaves the implementation to the sub-class.
2)when the subclass feels, it has to add few more details
specific to itself than which are provided by the
superclass.

so there is no duplication happening provided one overrides
a method sensibly(understanding thorougly if overriding a
method is necessary or not).if one wishes to write things
that are already available, it is then called "duplication
of code",

Is This Answer Correct ?    11 Yes 0 No

IS method overriding is Duplication of Methods?..

Answer / naveen kumar raavi

No.In subclass we will extend the functionality of super
class method.

Is This Answer Correct ?    7 Yes 0 No

IS method overriding is Duplication of Methods?..

Answer / sampada

yes and no.yes overiding is duplication of signatue only
but not implentation is duplicated.subclass gives diff
implementation of it.

Is This Answer Correct ?    3 Yes 1 No

IS method overriding is Duplication of Methods?..

Answer / guest

yes

Is This Answer Correct ?    3 Yes 18 No

Post New Answer

More Core Java Interview Questions

Write a program to solve producer consumer problem in java?

0 Answers  


What is a java string?

0 Answers  


Differentiate between postfix and prefix operators in java.

0 Answers   HCL,


What are the kinds of polymorphism?

0 Answers  


How many types of memory areas are allocated by JVM in java?

0 Answers   UGC Corporation,


how to create daemon thread in java?

0 Answers  


what is the difference between the methods sleep() and wait()? : Java thread

0 Answers  


Explain about the interpreter in java?

0 Answers  


how to create an applet

2 Answers  


what is anonymous class in java?

0 Answers  


What is regex java?

0 Answers  


What is native method in java?

0 Answers  


Categories