This is my code i have a doubt
class ab implements a,b
{
public void add()
{
System.out.println("Hi")
}
}
interface a
{
public void add();
}
interface b
{
public void add();
}
in this code i have two interface implemented in the class
has same method.just i want to know which method of
interface implemented in the class. interface a or interface
b? confused me .
Answer Posted / gohil
You can dynamically implement any of the interface
Ex
a intAImpObj= new ab();
b intBImpObj= new ab();
In above case intAImpObj is the implementation of a
interface and intBImpObj is the implementation of b interface
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can we have multiple catch block for a try block?
Why vector class is used?
What are the major drawbacks of external iteration?
What is a jit compiler?
What environment variables are required to be set on a machine in order to run Java programs?
What is string pool in java?
What is data movement?
Where is stringbuffer stored?
Where import statement is used in a java program?
What is difference between static and final?
What does java edition mean?
What are the two types of java programming?
What is the difference between numeric and integer?
Distinguish between a predicate and a function?
What is the full meaning of java?