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...

whats is inheritance?

Answer Posted / mukthiyar

Inheritance is a Reusable of the existing code.

There are two types of Inheritance implementation
Inheritance and interface Inheritance.

Implementation inheritance promotes reusability but improper
use of class inheritance can cause programming nightmares by
breaking encapsulation and making future changes a problem.
With implementation inheritance, the subclass becomes
tightly coupled with the superclass. This will make the
design fragile because if you want to change the superclass,
you must know all the details of the subclasses to avoid
breaking them. So when using implementation inheritance,
make sure that the subclasses depend only on the behavior of
the superclass, not on
the actual implementation.

Interface inheritance promotes the design concept of program
to interfaces not to implementations. This also reduces the
coupling or implementation dependencies between systems. In
Java, you can implement any number of interfaces. This is
more flexible than implementation inheritance because it
won’t lock you into
specific implementations which make subclasses difficult to
maintain. So care should be taken not to break the
implementing classes by modifying the interfaces.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to override the main method?

973


What is size_t?

978


What is the symbol for average?

1025


What is meant by distributed application? Why are we using that in our application?

940


What is charat ()?

931


Is java a virus?

947


What are the various access specifiers in java?

999


Can private class be inherited in java?

1025


Can vector have duplicates in java?

932


Can we have return statement in finally clause? What will happen?

955


why are wait(), notify() and notifyall() methods defined in the object class? : Java thread

982


What is java string pool?

999


Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?

1101


Define array. Tell me about 2-D array.

1042


What is the difference between stream and buffer?

963