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

How to create a fecelet view?

1044


How do I compare two strings in word in java?

1039


State the main difference between c++ and java?

1141


What is broken and continue statement?

1062


What is the difference amongst jvm spec, jvm implementation, jvm runtime ?

1018


What is the concept of multithreading?

1033


What is a method in programming?

1228


How to invoke external process in java.

1128


What is data type in computer?

1001


What will happen when using pass by reference in java?

1040


How do you sort a list in java?

1075


make a method which any number and any type of argument and print sum of that arguments.....

1861


Why should I use abstract class?

1184


Difference between throw and throws?

1158


Why does java not support pointers?

1175