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 are the advantages of inner classes?
Why are functions called methods in java?
What is volatile keyword in java
Write a java program to generate fibonacci series ?
What is method in java with example?
Can we have multiple classes in a single file?
Which class should you use to obtain design information about an object in java programming?
Why are there no global variables in java?
How can you set the applet size?
what is singleton in java?
In a container there are 5 components. I want to display the all the components names, how will you do that one?
What is java jit compilers?
Explain the difference between the public, private, final, protected, and default modifiers?
What is variable in java?
What do you mean by an interface in java?