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

What is java’s garbage collected heap?

932


Can list contain null in java?

1047


What does exclamation mean in java?

1040


How would you use Bubble Sort to sort the number of elements?

969


What are the advantages of exception handling in java?

1013


What is string [] java?

920


Why can't we use static class instead of singleton?

901


Explain about oops concepts.

1078


Which methods are used during serialization and deserialization process?

959


Which class cannot be a subclass in java?

973


What is generics in java interview questions?

1022


What does flagged out mean?

1018


What are the two main uses of volatile in Java?

1021


Can we extend a class with private constructor?

960


what is the messsage u r going to get from an objectoriented programing?

2066