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
Why can't we make a class private in java?
What does a void function return?
What is runtime locatable code?
What does escaping a character mean?
Explain the difference between runnable and callable interface in java?
Why enumeration is faster than iterator?
Can an unreferenced object be referenced again?
How do you sort objects in java?
What do you mean by hashing?
What is the purpose of the system class in java programming?
What is final class?
How do you sort arrays in java?
difference between byte stream class and character stream class?
What is main difference between variable and constant?
What is protected access modifier?