Answer Posted / nsiddiqui69@yahoo.com
Interface inf1
{
void show();
}
class Derived implement inf1
{
void show1()
{
S.o.p("Derived class method");
}
public void show()
{
S.o.p("Interface method");
}
}
class infdemo
{
p.s.v.m(String args[ ])
{
Derived d1= new Derived();
d1.show();
d1.show1();
}
}
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is the difference between static method and instance method in Java?
what is recursion in java
What is a char in java?
how to create constants in java?
What is the difference between JVM and JRE?
What is r in java?
Can you explain the meaning of aggregation and composition
How can you read content from file in java?
How does compareto work in java?
Why do we need array in java?
What is the difference between delete and delete[]
Is java hard to learn?
What does n mean?
What are the access modifiers available in java?
What are the 5 types of research methods?