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

When can we say that threads are not lightweight process in java?

1210


what r advatages of websphere? & how to deploy?

2258


What is the difference between jdk and jre?

1110


What are "methods" and "fields"?

1066


Explain yield() method in thread class ?

1114


If I don't provide any arguments on the command line, then what will the value stored in the string array passed into the main() method, empty or null?

1293


What is use of set in java?

1072


What is a static method in java?

1094


What is the escape character in java?

1035


What is super?

1250


Where is jre installed?

1091


Write a program to find the whether a number is an Armstrong number or not?

1073


Which collection does not allow duplicates in java?

1029


Explain illegalmonitorstateexception and when it will be thrown?

1155


What package is math in java?

1052