|Top Companies hiring on Shine.com. Click Here to apply !|
|Click Here to Submit Your Resume for MNC Jobs !|
How can we achieve Multiple Inheritance in Java ?
Directly we can't achieve Multiple Inheritance in Java.
Indirectly there are two ways, those are :
1. We can achieve Multiple Inheritance by implementing more than one Interfaces, because we can have chance to implement more than one Interfaces in Java.
2. Another indirect way to achieve Multiple Inheritance is, doing by repeated use of Single Inheritance.
Example : Class z extends A,B --- Inavallid (bcz direct way)
Class B extends A
} ---- those are vallid (bcz indirect way)
Class Z extends B
So, here Class z can have all the features of Class B and Class A, but here we are doing indirect way with the help of Single Inheritance.
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Why Java does not support Multiple Inheritance ?||vbraojava||Object Oriented Concepts||1||21 September 2008 02:55 PM|
|What are the Advantages of Inheritance ?||vbraojava||Object Oriented Concepts||0||11 September 2008 12:38 PM|
|What is Inheritance ?||vbraojava||Object Oriented Concepts||0||05 September 2008 04:35 PM|
|Walk-In @ "MNC COMPANIES" : Multiple Skills : On 30, 31 Aug 2008||pirates||Java Experienced Walk-In Jobs||0||27 August 2008 12:30 PM|