Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

What is the Benefit of Overriding

  Asked By: Francisca    Date: Apr 21    Category: Java    Views: 1638
  

I know the concept of Overriding & know how to implement but i don't
know what's the real benefit of it.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Luki Fischer     Answered On: Apr 21

Basically the use for extending comes in when you start doing class
abstraction for code reusability.

If you where going to make a number of Objects that are all-similar you
can make a parent Object that contains the information that all of the
classes need, such as basic methods, variables and so on.

While you are writing your sub-Objects it often comes about that some of
the basic functionality of the parent Object isn’t exactly right. If
this is the case operator overloading allows the programmer to just
change/override/overload that method to include the new information.

Somehow I think I didn't make it much easier to understand

 
Didn't find what you were looking for? Find more on What is the Benefit of Overriding Or get search suggestion and latest updates.




Tagged: