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

Can you extend more than one interface?

Answer Posted / ranganathkini

An interface can extend 1 or more interfaces. Though this
kind of extension mechanism is limited for classes extending
classes. It is not true for interfaces. Please observe
Interface3 in the following example:

interface Interface1 {
void method1();
}

interface Interface2 {
void method2();
}

interface Interface3 extends Interface1, Interface2 {
void method3();
}

public class InterfaceTest implements Interface3 {
public void method1() {

}

public void method2() {

}

public void method3() {

}

public static void main( String[] args ) {

}
}

Is This Answer Correct ?    67 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why can't we make a class private in java?

1035


What does a void function return?

1005


What is runtime locatable code?

1426


What does escaping a character mean?

1015


Explain the difference between runnable and callable interface in java?

1047


Why enumeration is faster than iterator?

937


Can an unreferenced object be referenced again?

1193


How do you sort objects in java?

962


What do you mean by hashing?

1108


What is the purpose of the system class in java programming?

1103


What is final class?

1022


How do you sort arrays in java?

927


difference between byte stream class and character stream class?

4556


What is main difference between variable and constant?

1036


What is protected access modifier?

1005