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


Please Help Members By Posting Answers For Below Questions

Difference between current previous versions of Java?

553


How can we access some class in another class in java?

545


What do you mean by inner class in java? Explain

584


What is natural ordering in java?

521


How to print an arraylist in java?

493






Can you call a method on a null object?

559


What is string value?

634


What happens if we override private method?

523


What is variable explain?

524


Can a top level class be private or protected?

570


What do you understand by java virtual machine?

705


design an lru cache in java?

542


How do you format in java?

547


Which is faster string or stringbuilder?

515


List the features of java programming language.

559