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

Explain the transient field modifier?

1048


Differentiate between postfix and prefix operators in java.

1127


What is the final access modifier in java?

1077


When we serialize an object does the serialization mechanism saves its references too?

1019


What are the types of web technologies?

1042


Can I import same package/class twice?

952


What is a boolean used for?

1113


Can we declare the static variables and methods in an abstract class?

990


what is the difference between process and thread? : Java thread

991


What is a condition in programming?

1011


How do I stop concurrentmodificationexception?

1032


What is a string what operation can be performed out with the help of a string?

1050


What is treemap in java?

944


Can we make a constructor final?

1018


Why do we use return statement?

1039