Answer Posted / ranganathkini
An interface can extend 1 or more interfaces. Though this
kind of extension mechanism is limited for classes extending
classes. It is not true for interfaces. Please observe
Interface3 in the following example:
interface Interface1 {
void method1();
}
interface Interface2 {
void method2();
}
interface Interface3 extends Interface1, Interface2 {
void method3();
}
public class InterfaceTest implements Interface3 {
public void method1() {
}
public void method2() {
}
public void method3() {
}
public static void main( String[] args ) {
}
}
| Is This Answer Correct ? | 67 Yes | 3 No |
Post New Answer View All Answers
Is hashset ordered java?
How to compare strings in java?
Explain about the security aspect of java?
What do you mean by stream pipelining in java 8?
Which are the two subclasses under exception class?
Can we override the overloaded method?
What is purpose of keyword void?
Why do we need data serialization?
What is default constructors?
Enlist few advantages of inheritance?
What is the purpose of a transient variable?
What is the use of bufferedreader?
How many ways can we create singleton class?
What is the replace tool?
Can we force the garbage collection to run?