Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What are the drawbacks of inheritance?
What are the drawbacks of inheritance?
✍: Guest
Since inheritance inherits everything from the super class and interface, it may make the subclass too clustering and sometimes error-prone when dynamic overriding or dynamic overloading in some situation. In addition, the inheritance may make peers hardly understand your code if they don't know how your super-class acts and add learning curve to the process of development.
Usually, when you want to use a functionality of a class, you may use subclass to inherit such function or use an instance of this class in your class. Which is better, depends on your specification.
2012-08-29, 2594👍, 0💬
Popular Posts:
What is shadowing ? When two elements in a program have same name, one of them can hide and shadow t...
What is hashing? To hash means to grind up, and that's essentially what hashing is all about. The he...
How To Display a Past Time in Days, Hours and Minutes? - MySQL FAQs - Managing Tables and Running Qu...
What are urlencode() and urldecode() functions in PHP? string urlencode(str) - Returns the URL encod...
What will be printed as the resultof the operation below: int x; int modifyvalue() { return(x+=10); ...