GeekInterview.com
Series: Subject: Topic:
Question: 554 of 577

How can you do multiple inheritance in Java

Asked by: Interview Candidate | Asked on: Sep 2nd, 2005
Showing Answers 1 - 11 of 11 Answers
Vrushali Talokar

Answered On : Jun 10th, 2005

Its not possible directly. That means this feature is not provided by Java, but it can be achieved with the help of Interface. By implementing more than one interface.

Yes  4 Users have rated as useful.
  
Login to rate this answer.
anil sharma

Answered On : Jul 27th, 2005

Muliple inheritance is done with the help of interfaces interfaces

Yes  1 User has rated as useful.
  
Login to rate this answer.
kishor

Answered On : Aug 17th, 2005

Why use uinterfaces for multiple inheritence in java?

  
Login to rate this answer.
Pavan

Answered On : Sep 2nd, 2005

Java overcame the problem of multiple inheritance exist in C++.In C++ we can create a class by extending from more than one class. It is problematic. So in Java this feature is eliminated. Anyway for getting multiple inheritance, Java introduced the concept of interfaces. So we can create a class by extending one class or we can implement any number of interfaces for it. But the restriction is we have to implement / describe every method existing in the interfaces. That's the rule. Ithink u know the concept of Interfaces!!!!!!!!!!!!!!!!!.right

  
Login to rate this answer.
sonia

Answered On : Sep 16th, 2005

multiple inher.. in java is implemented by INTERFACE

  
Login to rate this answer.
jayant

Answered On : Sep 28th, 2005

In java, multiple inheristance not supports, but using keyword 'implements', its allow to inherits multiple inteface separated by comma --- jayant dhargawe

  
Login to rate this answer.
Devidas Sonawane

Answered On : Oct 3rd, 2005

hi Devidas In Java we can use inheritance by using extends keyword. but by using implements we can inheritance more classes and this less complicated

  
Login to rate this answer.
Divya

Answered On : Aug 12th, 2006

You can use your own apporach for multiple inheritence

  
Login to rate this answer.
Anil Omanwar

Answered On : Jan 11th, 2007

hi,To achieve multiple Inheritance in java we must use Interface.

  
Login to rate this answer.
mohan b

Answered On : Nov 23rd, 2009

View all answers by mohan b

Only through Interface.

  
Login to rate this answer.
sony

Answered On : Nov 27th, 2011

Its not possible directly. That means this feature is not provided by Java, but it can be achieved with the help of Interface. By implementing more than one interface

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.