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 size of int?
What is an example of a boolean?
Can you explain the meaning of aggregation and composition
How many arguments can a method have java?
Explain the difference between extends thread vs implements runnable in java?
What is the private method modifier?
What are the steps in the jdbc connection?
What is the benefit of inner / nested classes ?
How does map works in java?
What is the difference between && and & in java?
What is the parse method in java?
How to connect to a remote database using Applet?
Difference between ‘is-a’ and ‘has-a’ relationship in java?
How do you clear a method in java?
What is a “stateless” protocol ?