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 java’s garbage collected heap?
Can list contain null in java?
What does exclamation mean in java?
How would you use Bubble Sort to sort the number of elements?
What are the advantages of exception handling in java?
What is string [] java?
Why can't we use static class instead of singleton?
Explain about oops concepts.
Which methods are used during serialization and deserialization process?
Which class cannot be a subclass in java?
What is generics in java interview questions?
What does flagged out mean?
What are the two main uses of volatile in Java?
Can we extend a class with private constructor?
what is the messsage u r going to get from an objectoriented programing?