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 variable argument in java?
How do you remove spaces in java?
Define immutable object?
What advantage do java's layout managers provide over traditional windowing systems?
What is passing parameters in java?
What is a void in java?
How can you write a loop indefinitely in java programming?
Can we create constructor in abstract class ?
What is meant by inheritance and what are its advantages?
How to use string tokenizer class.
What is sortedmap interface?
Is java written in c?
What is the largest data type in java?
What is a default method?
What is vector capacity in java?