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

What are the basic interfaces of java collections framework?

1119


What’s the difference between the methods sleep() and wait()?

1012


Explain java heap space and garbage collection?

1072


what is recursion in java

1176


What does @param args mean in java?

1058


What is == mean?

998


How many threads does a core java have?

1070


Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?

1156


Why spring singleton is not thread safe?

997


Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?

1161


Can a class have a static inner class?

1082


What is complexity and its types?

1031


Describe the Big-O Notation.

1046


How can you read content from file in java?

1004


What is variable argument in java?

1004