Inheritance Questions and Answers

Showing Questions 1 - 20 of 80 Questions
First | Prev | | Next | Last Page
Sort by: 

Why Java does not support multiple inheritance?Why Java is not pure object oriented?

Asked By: vas | Asked On: Sep 18th, 2005

Answered by: pratima on: Oct 15th, 2014

If Java supports multiple inheritance then compiler will get confuse which override method will called,because it may be case same methods are using in different different classes . {geshibot langua...

Answered by: M.Rajeev on: Aug 27th, 2014

Java does not support multiple inheritance,reason is where the sub class having many number of super classes. java applications are purely object oriented because of some primitive data types java lan...

19 answers

what are the advantages of inheritance?

Asked By: Interview Candidate | Asked On: Jun 24th, 2005

Answered by: Brijendra on: Sep 23rd, 2012

1) Inheritance is the concept where the child class can concentrate on new features that it want. because all the basic features it will get it from its parent class. 2) It is about re-usability of f...

Answered by: manisha chandani on: Aug 24th, 2012

Helps in reusability of code. Program development time is reduced. Helps as security purpose.

5 answers

What do you mean by inheritance?

Inheritance is the process of creating new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class, but can add embellishments and refinements of its own.  

Asked By: Interview Candidate | Asked On: Sep 8th, 2005

Answered by: shylu on: Jun 22nd, 2012

It is a process that one class can acquires the properties of another base class

Answered by: PaulSingh on: Feb 7th, 2012

Inheritance is the ability of once class to inherit the functionality of the base class and specialise it. Typically the relationship between the derived class and the base class is an "IsA" relations...

8 answers

Why multiple inheritance using classes is disadvantage in Java

Asked By: Naresh | Asked On: Sep 12th, 2005

Answered by: sampra on: Mar 13th, 2012

java is build based on concept of no multiple inher to avoid memory usage and ambiguity too

Answered by: A.Bava Bahrudeen on: Sep 17th, 2011

Multiple inheritance does not support in java. Because, ambiguity has been involved in the multiple inheritance in C++ language. That means, a class access the same properties of more than one class....

7 answers

What are the types of inheritance?

Asked By: pradeeppk | Asked On: Sep 23rd, 2005

Answered by: gowtham on: Feb 28th, 2012

Creating a new classes from exiting classes
5 type

Answered by: ruchika arora on: Feb 27th, 2012

There are 5 types of inheritance: -
1. Single inheritance
2. Multilevel inheritance
3. Multiple inheritance
4. Hierarchical inheritance
5. Hybrid inheritance

14 answers

In priVATe inheritance derived class members can access base class members that are 1) public 2) priVATe 3) protected a) 1 & 2 b) 1 & 3 c) 2 & 3 d) 1,2 & 3

Asked By: wproed | Asked On: Sep 22nd, 2006

Answered by: Nagu on: Feb 27th, 2012

Ans : B) 1 & 3 because private access member cant access by derived class. ref:

Answered by: Rahul R Todekar on: Aug 12th, 2009

D) 1,2 & 3

9 answers

How can you do multiple inheritance in Java

Asked By: Interview Candidate | Asked On: Sep 2nd, 2005

Answered by: sony on: Nov 27th, 2011

Its not possible directly. That means this feature is not provided by Java, but it can be achieved with the help of Interface. By implementing more than one interface

Answered by: mohan b on: Nov 23rd, 2009

Only through Interface.

11 answers

How we can use inheritance and polymorphisms in c# programming?

Asked By: sandeep | Asked On: Jun 13th, 2006

Answered by: Suresh Jayaraman on: Sep 27th, 2011

Inheritance: We can access the properties,fields,events methods from one class to another class. Polymorphism: There are two types of polymorphism. 1.Compile time polymorphism -- function overlo...

Answered by: george on: Aug 11th, 2011

When we create a new class which is derived from the existing class is called inheritance... This class is called as derived class and the existing class is called as base class.. Polymorphism is no...

5 answers

what is meant by inheritance ? Explain with an example

Asked By: Interview Candidate | Asked On: Jun 24th, 2005

Answered by: amrutabhavana on: Sep 4th, 2011

Inheritance is acquiring properties of one class from another class, the class which is inherited is called base class and the class which acquir the properties is called derived class. eg: {geshibot...

Answered by: Amit on: Aug 18th, 2011

Inheritance is one of the cornerstones of object-oriented programming because it allows the creation of hierarchical classifications. Using inheritance, you can create a general class that defines tra...

3 answers

What do mean by polymorphism, inheritance, encapsulation?

Polymorhism: is a feature of oopl that at run time depending upon the type of object the appropriate method is called.Inheritance: is a feature of oopl that represents the "is a" relationship between different objects(classes). Say in real life a manager is a employee. So in oopl manger class is inherited...

Asked By: Interview Candidate | Asked On: Aug 28th, 2004

Answered by: subash on: Aug 6th, 2011

polymorphism: it is used to derive the class one in many form inheritance: deriving the neq class from the existing class encapsulation: hiding the information

1 answer

Why multiple inheritance is not possible in c#?

(please do not answer like this-it is possible through interfaces.)

Asked By: Rohit Sharma | Asked On: Apr 21st, 2006

Answered by: sajad on: Jul 19th, 2011


Answered by: Ankit Seth on: Jul 11th, 2011

I don't think that overriding will be a problem if you define your generic interface in a good manner.I've written that multiple inheritance is avoided to prevent the identity crisis. So it is...

12 answers

Why is multiple inheritance not allowed in Java?

Asked By: swati | Asked On: Sep 30th, 2005

Answered by: pallabi87 on: May 16th, 2011

this is so because it leads to a problem called "dirty diamond".that is, say class B and C inherit from class A.class B and C might override the methods in A.Now if D inherits from B and C(multiple in...

Answered by: mundravijay on: Dec 7th, 2009

Due to the naming complexity in Base & Drived classes,We Can't provide a solution  every time using Inheritance with same name of member,methods.That's why It's not allowed in JAV...

23 answers

Why can't we use multiple inheritance and garbage collector parallelly in .Net

Star Read Best Answer

Asked By: Amit | Asked On: Jan 16th, 2006

Answered by: Pendurti on: Sep 11th, 2008

Well C# doesn't support multiple inheritance through classes.If you want to have multiple inheritance in your program, you need to make use of interfaces. A class cannot inherit from mor...

Answered by: Mob: +91 9849255958 on: Jan 4th, 2007

Actually, GC is a low-level thread.  When it gets activated, all other threads in the applications are put on hold.

7 answers

What is proper and improper inheritance? Explain with an example?

Star Read Best Answer

Asked By: tanish | Asked On: Feb 19th, 2007

Answered by: yzesong on: Jul 30th, 2009

As long as no diamond problems (improper inheritance),  single or multiple inheritance can all be proper inheritance. When usng multiple inheritance with diamond problem, you can use virtual inhe...

Answered by: michaelpyles on: Dec 28th, 2007

Proper inheritance occurs when the derived class "IS A" specialized type of the base class.  Example Cat IS A Animal. Improper inheritance occurs when a class is inherited from merely f...

3 answers

What is the difference between inheritance and aggrigation?

Asked By: anuradha | Asked On: Jun 6th, 2006

Answered by: vinaymudgil007 on: Mar 21st, 2011

Inheritence means --> "is-a" relationshipe.g. HONDA CITY  is-a  CARAggregation means --> "has-a" relationshipHONDA CITY  has-a  engineHope this ...

Answered by: navneetgoyal2000 on: Jan 5th, 2011

If we have to explain it with example, then Inheritance (IS A or TYPE OF) & Aggregation (HAS A) can be understood as:a CAR IS A (an) Automobile.   (Inheritance: Car inherits its properties fr...

4 answers

Java supports multiple inheritance

Skill/topic: inheritancea) trueb) false

Asked By: Interview Candidate | Asked On: Jan 9th, 2006

Answered by: nverma on: Feb 17th, 2011

False, Java doesn't support multiple inheritence..
C++ supports multiple inheritence

Answered by: Hemasenthil on: Jun 18th, 2008

via interface implementation

10 answers

How do you implement inheritance in vb.Net

A) using extends keywordb) using imports keywordc) using override keywordd) none

Asked By: Interview Candidate | Asked On: Dec 4th, 2005

Answered by: huuchung on: Jan 4th, 2011

D/ none of above

Answered by: ptharak on: Jun 30th, 2010

by using inherits keyword

class sampl2
 inherits  sample1

10 answers

What do mean by polymorphism, inheritance, encapsulation?

Polymorhism: is a feature of oopl that at run time depending upon the type of object the appropriate method is called.Inheritance: is a feature of oopl that represents the "is a" relationship between different objects(classes). Say in real life a manager is a employee. So in oopl manger class is inherited...

Asked By: Interview Candidate | Asked On: Aug 28th, 2004

Answered by: gvjava on: Dec 8th, 2010

We can't create the object directly for the abstract classes,we can create object indirectly when we are inheriting that is called as polymorphism.  ex:  abstract class man   ...

Answered by: veenanimbalkar on: Dec 6th, 2010

Polymorphism is the major pillar of OOPs and Java. There are two types of polymorphism static time polymorphism & dynamic type of polymorphism. Static time polymorphism is called as" method overloa...

3 answers

What are some alternatives to inheritance?

Asked By: Amalesh Jana | Asked On: Jun 7th, 2006

Answered by: dkjena4u on: Sep 7th, 2010

Delegation is an alternative to inheritance in Java. Kavita has provided useful information, but a peice of code snippet could have been more useful.

Answered by: sampra on: Mar 11th, 2008

IS A relation ship is the alternative of inheritance

4 answers

What type of inheritance that PHP supports

Asked By: Deep | Asked On: Sep 30th, 2007

Answered by: rubin2008 on: May 10th, 2010

PHP supports only single inheritance.But multiple inheritance can be implemented in php through use of interface

Answered by: akki517 on: Dec 4th, 2009

PHP Supprots only single inheritences

7 answers

First | Prev | | Next | Last Page


Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.



twitter fb Linkedin GPlus RSS


Interview Question

 Ask Interview Question?


Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.