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 |
What is size_t?
In how many ways we can do exception handling in java?
Can you sort a string in java?
What is the meaning of flag day?
What is Major and importance difference between for and foreach loop ?
Can a lock be acquired on a class?
What is the purpose of using bufferedinputstream and bufferedoutputstream classes?
what is difference between signed & unsigned char?
Differentiate jar and war files?
Which access specifier can be used with class ?
Explain the difference between arraylist and linkedlist in java?
Explain the difference between serializable and externalizable in java?