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...

Is java supports multiple inheritance? explain?

Answer Posted / krishna kumar g.

Java doesn't supports Multiple Inheritence.
Let see the example.
class A
{
void m1()
{
// some code
}
}
class B
{
void m1()
{
// some code
}
}
class C extends A,B
{
void m2()
{ }
public static void main(String[] args)
{
C c=new C();
c.m1();
}
}
If we want to call m1() by using class C object, then
which class method(m1()) will be called.It is unable to
find the which class method(m1()) will be called.
So multiple Inheritence is not posssible.

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is runtime polymorphism or dynamic method dispatch?

975


Why should we use singleton pattern instead of static class?

896


What is structure of java heap? What is perm gen space in heap?

1065


Can we override tostring method in java?

934


How does map works in java?

947


Explain about static nested classes in java?

1031


What is java thread dump, how can we get java thread dump of a program?

945


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

1053


How are destructors defined in java?

993


How do you take thread dump in java?

952


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

1938


What is instance example?

922


Explain about the dynamic behavior of core java?

1079


What are the basics of core java?

973


Difference between static and dynamic class loading.

1063