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
Can a class be private or protected in java?
What is a short in java?
Does it matter in what order catch statements for filenotfoundexception and ioexception are written?
How are this() and super() used with constructors in java programming?
How can you read content from file in java?
What is treeset in java collection?
What is the difference between replace and replace all?
Which class is the superclass of all classes?
What do you mean by ordered and sorted in collections in java?
What is a variable analysis?
Explain about narrowing conversion in java?
what is optional in java 8?
What do you mean by garbage collection used in java?
What are runtime exceptions?
What is treeset in java?