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 / manish kushwaha

Hi All,
As we all know java is not complete OOps language the reason
behind this is java does not support multiple inheritance,
to avoid this draw back of java sun introduce interface
alomg with few new concept.

So 110% sure that we can implements and we can extends as
well more than one interface.

Scenarios:
1) in term of subclass

interface i1{
void mi1();
}
interface i2{
void mi2();
}

now

Case 1:

public class MultipleImplements implements i1,i2{
// now here we need t implement all methods available in i1
and i2 (restricted)

public void mi1(){
System.out.println("Interface i1 mthod");
}
public void mi2(){
System.out.println("Interface i2 mthod");
}
}

Case 2:

interface i3 extends i1,i2{
// here use can define more method and you can not over ride
i1 and i2 method because you can not method body in interface so
String mi3();
}

Conclusion: 110% you can extend and implement more than one
interface

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the default value of an object reference declared as an instance variable?

1107


What is void keyword?

1090


Is java a security risk?

1028


What is meant by distributed application? Why are we using that in our application?

938


What's the difference between int and integer in java?

1141


How use .contains in java?

1160


What about abstract classes in java?

1047


What are different access specifiers in java? Explain

1098


what is the constructor and how many types of constructors are used in java?

990


Why java is considered dynamic?

1153


What is Gang of four design patterns

1045


What is the meaning of flag day?

1014


When do we use synchronized blocks and advantages of using synchronized blocks?

1210


What is difference between module and function?

1146


What are the disadvantages of using inner classes?

1157