Chemistry, asked by asmafarooq121298, 3 months ago

what is inheerrtance​

Answers

Answered by rishikeshgohil1569
1

Inheritance in java is a mechanism in which one object acquires all the properties and behaviors of parent object.

Answered by HɪɢʜᴇʀKᴜsʜᴀʟBᴏʏSᴜʙs
0

QUESTION:

  • What is Inheritance?

ANSWER:

  • In object-oriented programming, inheritance is the mechanism of basing an object or class upon another object or class, retaining similar implementation. Also defined as deriving new classes from existing ones such as super class or base class and then forming them into a hierarchy of classes.

EXPLANATION:

  • In most class-based object-oriented languages, an object created through inheritance, a "child object", acquires all the properties and behaviors of the "parent object" , with the exception of: constructors, destructor, overloaded operators and friend functions of the base class. Inheritance allows programmers to create classes that are built upon existing classes, to specify a new implementation while maintaining the same behaviors (realizing an interface), to reuse code and to independently extend original software via public classes and interfaces. The relationships of objects or classes through inheritance give rise to a directed graph.
Similar questions