Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


WAP to illustrate the use of interface

Answers were Sorted based on User's Feedback



WAP to illustrate the use of interface..

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

WAP to illustrate the use of interface..

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

Post New Answer

More Core Java Interview Questions

What is size_t?

0 Answers  


In how many ways we can do exception handling in java?

0 Answers  


Can you sort a string in java?

0 Answers  


What is the meaning of flag day?

0 Answers  


What is Major and importance difference between for and foreach loop ?

0 Answers   Infosys,


Can a lock be acquired on a class?

3 Answers  


What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

0 Answers  


what is difference between signed & unsigned char?

2 Answers  


Differentiate jar and war files?

0 Answers  


Which access specifier can be used with class ?

0 Answers  


Explain the difference between arraylist and linkedlist in java?

0 Answers  


Explain the difference between serializable and externalizable in java?

0 Answers  


Categories