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

Is hashset ordered java?

1066


How to compare strings in java?

983


Explain about the security aspect of java?

955


What do you mean by stream pipelining in java 8?

1197


Which are the two subclasses under exception class?

1066


Can we override the overloaded method?

1115


What is purpose of keyword void?

1025


Why do we need data serialization?

966


What is default constructors?

984


Enlist few advantages of inheritance?

1057


What is the purpose of a transient variable?

1036


What is the use of bufferedreader?

983


How many ways can we create singleton class?

947


What is the replace tool?

1137


Can we force the garbage collection to run?

933