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

Does Java support multiple Inheritance?

Answer Posted / debapriya patra

Java does not support multiple inheritance.Why?

If anybody ask u why java does not support multiple
inveritance then answer is:"Whenever we create an instance
of a child class and we extend more then one class like
C++, then if these two classes contain same variable then
which will print if we try to print the variable."

Example:
class a
{
int i = 10;
}
class b
{
int i = 10;
}

class c extends a,b
{
public static void main(String[] args)
{
c c1 = new c();
System.out.printn(c1.i);//Here an ambiguous situation
will occur
}
}

Is This Answer Correct ?    29 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between numeric and integer?

1008


How is java hashmap implemented?

1032


Can keyword be used as identifier?

965


How do you break a loop?

985


What are the differences between stringbuffer and stringbuilder?

1062


Why is java called the platform independent programming language?

1007


What do you mean by inner class in java? Explain

1070


What is java english?

1004


Are arrays dynamic in java?

1034


What is unicode full form?

982


What is a container in a gui?

994


What are the two types of streams offered by java 8?

926


How do you declare a destructor in java?

1003


What does next mean in java?

969


Where will it be used?

1942