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
What is the purpose of interface?
What is a conditional equation?
What is variable explain with example?
Name the components that are termed to be Heavy-weight component but available in Light-weight components?
Why are global variables used?
What do you mean by a JVM?
What are loops in java?
Tell me about your ability to work under pressure
Why do we use regex?
How will you communicate between two applets?
Explain the access modifiers for a class, method and variables?
What are the differences between wait() and sleep()?
What's the difference between comparison done by equals method and == operator?
What is stack explain?
What is space character in java?