Interface A {
String test();
}

Interface B {
int test();
}

Create a class AB which must implements both A & B
interfaces.

Answer Posted / kssrk ramesh

forget about implementing the interface
First of all can we can not have two similar method names
only with return type as different.As per overloaded method
concept it is not acceptable.So inorder to implement the
interfaces we need to do like that which is not acceptable
as per overloaded methods principle and hence compilation
error.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a constructor, constructor overloading in java?

524


What does this () mean in constructor chaining concept?

556


How do you compare values in java?

542


What is lambda in java?

515


Is java based on c?

532






Differences between C and Java?

614


What is append function?

562


Is java platform independent?

563


What are alternatives to java serialization?

599


Explain java coding standards for constants?

571


How does the garbage collector works in java?

568


How do you get length in java?

555


Give few examples of final classes defined in Java API?

702


How to call one constructor from the other constructor ?

599


What is boolean false?

524