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
Can we return null in java?
What is the purpose of abstract class?
What is rule of accessibility in java?
What is difference between static class and singleton pattern?
What does exclamation mean in java?
How do you start a thread?
Print Vertical traversal of a Binary Tree.
Explain about exception propagation?
Difference between string, stringbuffer and stringbuilder?
How do you trim a space in java?
What is variable argument in java?
What do you mean by default constructor in java?
Can interface be private in java?
Where are register variables stored?
How do you print array in java?