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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a string be null?

959


What are the different types of java?

1040


Why is method overloading not possible by changing the return type in java?

980


how to split string in java?

1195


How do you use parseint in java?

969


What is constructor and its types?

1128


What are alternatives to java serialization?

1101


Is heap stored in ram?

943


What is nan in java?

970


Can Exception handling we can handle multiple catch blocks?

1026


What are the different conditional statements?

974


Give the hierarchy of inputstream and outputstream classes.

1084


How many bits is a string?

974


Define Multiprogramming and Multiprocessing in java.

1125


How do you escape sequences in java?

1060