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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What does string intern() method do?

1047


Explain the difference between static and dynamic binding in java?

1019


What is a method vs function?

980


What do you understand by access specifiers in Java?

964


What language is pass by reference?

971


What is the purpose of a parameter?

1003


Explain java thread life cycle.

968


Can a string be null?

927


How do you create a method in java?

945


What are local variables?

1002


How do you clear a method in java?

958


Why is multiple inheritance not supported in java?

965


what is encapsulation in java? Explain

1052


explain local datetime api in java8?

968


What is fail first in java?

1083