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

Why a client should be multithreading? Explain.

1091


What is Remote Server?

2203


What is meant by method chaining?

1150


If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

2209


What is RMI and what are the services in RMI?

1176


Explain what is orm?

1111


A user of a web application sees a jsessionid argument in the URL whenever a resource is accessed. What does this mean? a. The form must have the field jsessionid b. URL rewriting is used as the session method c. Cookies are used for managing sessions

2246


What are the different class loaders used by jvm?

1099


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

1103


whats is mean by connectionpooling

2013


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

1153


How would you detect a keypress in a jcombobox?

1142


What is the purpose of the wait(), notify(), and notifyall() methods?

1032


What do you need to set-up a cluster with jboss?

1077


What state does a thread enter when it terminates its processing?

1065