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

What is permgen or permanent generation?

1020


what are the advantages of JTA over JTS?

2200


In RMI, inorder to sent the stub reference to the client, is we have to load the server object first into the memory or can we directly sent reference to the client?

2087


What are the steps to write p-to-p model application?

2476


When a thread blocks on i/o?

1088


What are the sequence of steps to write pub or sub model kind of application?

2513


Name the eight primitive java types.

1119


How messaging services are done, before release of JMS?

2134


Which class is the immediate superclass of the menucomponent class?

1196


What is abstract schema?

1018


difference between  ejb,struts,hibernate,spring and jsp

2855


What is TL and its use?

2459


What is jboss?

1031


What is the infobus?

1081


Describe, in general, how java's garbage collector works?

1030