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
What is a constructor, constructor overloading in java?
What does this () mean in constructor chaining concept?
How do you compare values in java?
What is lambda in java?
Is java based on c?
Differences between C and Java?
What is append function?
Is java platform independent?
What are alternatives to java serialization?
Explain java coding standards for constants?
How does the garbage collector works in java?
How do you get length in java?
Give few examples of final classes defined in Java API?
How to call one constructor from the other constructor ?
What is boolean false?