How multipleInheritance is possible in java?

Answer Posted / harikrishna

Hi, Aruna how r u doing?

In Java multiple inhritance provided through interfaces
by extending morethan one interface. We can extend more
than one class in C++. But this is not possible in java
that's why java doesn't support mutiple inhritance
directly.
public interface GroupedInterface extends Interface1,
Interface2,
Interface3

An interface can extend other interfaces, just as a class
can extend or subclass another class. However, whereas a
class can extend only one other class, an interface can
extend any number of interfaces. The interface declaration
includes a comma-separated list of all the interfaces that
it extends.
Aruna if you still not understood please
go through
http://java.sun.com/docs/books/tutorial/java/IandI/createint
erface.html this site. if you understad it' good. give me
feed back.
Thanq

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the methods of object class ?

563


What does n mean?

518


What is oop in java?

526


What is the main purpose of serialization in java?

530


Explain the different forms of polymorphism?

569






Distinguish between a predicate and a function?

574


Tell me are there implementations for sorting and searching in the java libarary?

598


What is difference between classpath and path variables in java?

554


What is implicit object in java?

548


Java openings 3 - 5 years, Lnt Infotech. requirements - core java, J2ee, struts, hibernate Interview Date:- 19 March 2011 Time:- 9:00 AM to 12:00 Pm Interview Location - L & T Infotech, Manapakkam, Chennai Refererral PS NO:- 291649 (Please mention this when u fill the form only then u will be considered for interview) Documents Required:- Latest Resume, Photograph and last 3 payslips Mail me on vasan2211@gmail.com once u appear for interview

2854


Can list be final in java?

489


How many bytes are a float?

509


Is linkedlist thread safe in java?

562


Which container method is used to cause a container to be laid out and redisplayed in java programming?

603


What is the ==?

468