Tuesday, 4 November 2014

INHERITANCE

INHERITANCE
1.Inheritance in java is a mechanism in which one object acquires all the properties and behaviors of parent object.
2.Inheritance represents the IS-A relationship, also known as Parent-Child relationship.
3.The keyword extends indicates that you are making a new class that derives from an existing class

Uses of Inheritance:
  • For Method Overriding (So Runtime Polymorphism).
  • For Code Reusability.
 Types of Inheritance
types of inheritance in java 
multiple inheritance in java 

Why multiple inheritance is not supported in java?

To reduce the complexity and simplify the language, multiple inheritance is not supported in java.
Print Friendly Version of this pagePrint Get a PDF version of this webpagePDF

No comments:

Simplest way to display Server Time in JSP using js

THE BELOW CODE WORKS ONLY IN JSP : <html> <body > <table width="95%" border="1" cellpadding="1...