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

How do you avoid global variables?

1015


What is final?

1003


Is 0 a prime number?

925


Is vector ordered in java?

951


What is the difference between sleep and wait in java?

896


What is byte data type?

941


Why java is a platform independent? Explain

1004


What are the disadvantages of object oriented programming?

1168


How will you invoke any external process in java?

1045


What are latest features introduced with java 8?

1007


What is numel matlab?

1242


What is == and === in javascript?

987


Describe how to implement singleton design pattern in struts.

945


What are three types of loops in java?

1048


What is meant by 'bit masking' in java?

1109