WAP to illustrate the use of interface
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / siva mukesh
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 ? | 0 Yes | 0 No |
Explain Stream Tokenizer?
Should database connections be singleton?
what do you mean by java annotations?
What is method Overriding in the perspective of OOPS?
what is difference between type 4 driver and type 1 driver?
2 Answers CMC, CTS, IBM, JK Technosoft, Napier Healthcare,
Is there memory leaks in java?
Is java 9 released?
What does function identity () do?
What is merge sort in java?
Can java cast null?
How many inner classes can a class have?
How to restrict a member of a class from inheriting by its sub classes?