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 write Java code for declaration of multiple
inheritance in Java ?

Answer Posted / vikas jaiswal

mainly there is no multiple inheritance in java...
but we can make our program to work like multiple inheritance and it is possible via interface..

interface is blue print of class,it is used to achieve fully abstraction and multiple inheritance in java.

java compiler adds public and abstract keyword before the interface method and public static and final keyword before data members.you can see this via decompile the class.

an interface extends another interface.

class MyClass implements MyInterface1,MyInterface2{}
OR
class MyClass extends ParentClass implements MyInterface1{}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are there books about seam?

1079


What is a session? Can you share a session object between different theads?

968


Define prototype?

1045


Why are my checkboxes not being set from on to off?

1128


What is in-memory replication?

1043


Can I import same package/class twice? Will the jvm load the package twice at runtime?

1131


What if the static modifier is removed from the signature of the main method?

1228


Difference between DurableSubscription and non- DurableSubscription?

2177


Is there a guarantee of uniqueness for entity beans?

994


Is infobus easy to use?

1027


In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?

1162


What is the highest-level event class of the event-delegation model?

1079


Explain the difference between object state and behavior?

1028


What’s jboss jbpm?

1013


Why is actionform a base class rather than an interface?

1046