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 the purpose of interface?

1007


What is a conditional equation?

1048


What is variable explain with example?

1067


Name the components that are termed to be Heavy-weight component but available in Light-weight components?

2491


Why are global variables used?

1023


What do you mean by a JVM?

1254


What are loops in java?

1276


Tell me about your ability to work under pressure

2198


Why do we use regex?

1034


How will you communicate between two applets?

1172


Explain the access modifiers for a class, method and variables?

1143


What are the differences between wait() and sleep()?

1019


What's the difference between comparison done by equals method and == operator?

974


What is stack explain?

1007


What is space character in java?

1114