What is inheritance?

Answer Posted / sri

Inheritance is a type of relationship among classes, wherein
one class shares the structure or behaviour defined in one
(single inheritance) or more (multiple inheritance) other
classes. Inheritance defines a "kind of" hierarchy among
classes in which a sub class inherits from one or more
super-classes; a sub-class typically augments or redefines
the existing structure and behaviour of its super-classes.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is bootstrap, extension and system class loader? Or can you explain primordial class loader?

505


What is the difference abstract class and interface?

535


What are a base class, subclass, and superclass?

561


What are the features of encapsulation ?

563


What is the purpose of late binding in object-oriented programming?

567






What is an abstraction and why is it important?

578


Explain the rationale behind object oriented concepts?

596


Describe the Diamond problem. Where does this problem occur?

552


Explain about realistic modeling?

568


How can we call the base method without creating an instance?

591


Do we require parameter for constructors?

694


What are sealed modifiers?

623


What is a friend function?

586


What are different types of arguments?

635


What is an interface?

593