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

interface A {
String test();
}

interface B {
int test();
}

class AB implements A
{


public String test()
{ System.out.println("Test1 in AB");
return "a";
}
}
class Test
{
public static void main(String as[])
{

AB i = new AB();
B b = new B(){
public int test()
{
System.out.println("Test");
return 1;
}
};
i.test();
b.test();
}
}

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is thread count in java?

961


Where is const variable stored?

892


What is equlas() and hashcode() contract in java? Where does it used?

1065


What is variable and example?

919


Explain about abstract classes in java?

989


What is r in java?

1004


What are the different http methods?

984


What is meant by bytecode?

971


What is consumer in java?

929


Which class is the superclass of all classes?

1069


Why is it called buffering?

1065


What is regex java?

1040


Which sorting algorithm is in place?

909


What are the advantages of autoboxing?

985


What are three ways in which a thread can enter the waiting state in java programming?

1105