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

Interface A {
String test();
}

Interface B {
int test();
}

Create a class AB which must implements both A & B
interfaces.

Answer Posted / sailaja

Interface A {
String test();
}

Interface B {
int test();
}

Class AB implements A,B
{
String test()
{
System.out.println("Test");
}
int test()
{ System.out.println("Test1");
}
}
Class Test
{
public static void main(String as[])
{
Interface i=null;

i=new AB();
i.test();
}
}

Is This Answer Correct ?    4 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the destroy method?

1010


Is 0 a real number?

983


What are nested classes in java?

1055


What’s a deadlock?

1059


Is cout buffered?

1122


Explain the difference between transient and volatile in java?

969


What is not object oriented programming?

883


Do we have pointers in java?

908


What is a constructor overloading in java?

998


What is the difference between access specifiers and access modifiers in java? 16

968


Can constructor be inherited?

992


Is array passed by reference in java?

992


What is multithreading in java?

1014


What is an infinite loop?

1162


Why do we override tostring method in java?

914