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 static import in java?

940


Is java same as core java?

1036


What are basic keywords?

998


What is try-with-resources in java?

1101


What is array initialization in java?

986


What is variable explain with example?

993


What is tree node in java?

922


What is a flag variable?

912


What is java util?

973


Variables used in a switch statement can be used with which datatypes?

934


Explain about abstract classes in java?

984


What is lastindexof in java?

1025


What is jvm? How its run?

1018


How does queue work in java?

934


Can you instantiate the math class?

991