Interface A {
String test();
}
Interface B {
int test();
}
Create a class AB which must implements both A & B
interfaces.
Answer Posted / nitin
Sandeep,
Interface B gets the compilation error saying, "The return
type is incompatible with A.test()"
Hence, the proposed solution is not correct.
Is This Answer Correct ? | 13 Yes | 2 No |
Post New Answer View All Answers
Difference between current previous versions of Java?
How can we access some class in another class in java?
What do you mean by inner class in java? Explain
What is natural ordering in java?
How to print an arraylist in java?
Can you call a method on a null object?
What is string value?
What happens if we override private method?
What is variable explain?
Can a top level class be private or protected?
What do you understand by java virtual machine?
design an lru cache in java?
How do you format in java?
Which is faster string or stringbuilder?
List the features of java programming language.