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 the use of runnable interface?
Is cout buffered?
Can we have multiple catch block for a try block?
What do you mean by scope of variable?
How do you change an int to a string?
What is the method to expand and collapse nodes in a jtree?
What is jrmp?
Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.
How do you use nextline in java?
What is another word for methodology?
What is the importance of finally block in exception handling?
What are three types of loops in java?
Is the empty set a singleton?
What is default locale java?
Explain the available thread states in a high-level?