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 / ujas doshi

No...Actually java does not support multiple inheritance.
You can say bcoz of reason mentioned by debapriya.

But if you want a class to be inherited from 2 classes you
can use a concept in java called interfaces..

class C extends A, extends B ---wrong, error, only one
class can be inherited

class C implements A, implements B ---fine, here A and B
are not classes but they are interfaces.

Now what are interfaces?
interfaces are similar to classes except a few things
1)Interfaces must contain static methods only

Is This Answer Correct ?    17 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a line break example?

1002


Define max and min heap, also the search time of heap.

1030


Why pass by reference is not possible in java?

1046


What is floor in java?

1040


What is the largest number a double can hold?

1047


What is function and its uses?

1120


Implement a stack with push (), pop() and min() in O(1) time.

1114


Which is dependent variable?

905


Define a package.

1090


What are methods?

1028


How to write custom exception in java?

1060


Which package is always imported by default?

1101


What are the disadvantages of object oriented programming?

1280


Where are register variables stored?

1018


What is indexof in java?

1007