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 |
How the elements are organized in GridBagLayout?
When a thread is executing synchronized methods , then is it possible to execute other synchronized methods simultaneously by other threads?
What is an array length?
What are scalar data types?
What is a null class?
is it possible to instantiate the math class?
According to java operator precedence, which operator is considered to be with highest precedence?
What is finally in exception handling?
What is Distributed Application and what is its usage?
How do you make an arraylist empty in java?
What is difference between static method and static variable?
How do you sort words in java?