Social Sciences, asked by Nehaa48, 7 months ago

What is inheritance?? define it.... ​

Answers

Answered by Anonymous
8

Iɴ ᴏʙᴊᴇᴄᴛ-ᴏʀɪᴇɴᴛᴇᴅ ᴘʀᴏɢʀᴀᴍᴍɪɴɢ, ɪɴʜᴇʀɪᴛᴀɴᴄᴇ ɪs ᴛʜᴇ ᴍᴇᴄʜᴀɴɪsᴍ ᴏғ ʙᴀsɪɴɢ ᴀɴ ᴏʙᴊᴇᴄᴛ ᴏʀ ᴄʟᴀss ᴜᴘᴏɴ ᴀɴᴏᴛʜᴇʀ ᴏʙᴊᴇᴄᴛ ᴏʀ ᴄʟᴀss, ʀᴇᴛᴀɪɴɪɴɢ sɪᴍɪʟᴀʀ ɪᴍᴘʟᴇᴍᴇɴᴛᴀᴛɪᴏɴ. Aʟsᴏ ᴅᴇғɪɴᴇᴅ ᴀs ᴅᴇʀɪᴠɪɴɢ ɴᴇᴡ ᴄʟᴀssᴇs ғʀᴏᴍ ᴇxɪsᴛɪɴɢ ᴏɴᴇs sᴜᴄʜ ᴀs sᴜᴘᴇʀ ᴄʟᴀss ᴏʀ ʙᴀsᴇ ᴄʟᴀss ᴀɴᴅ ᴛʜᴇɴ ғᴏʀᴍɪɴɢ ᴛʜᴇᴍ ɪɴᴛᴏ ᴀ ʜɪᴇʀᴀʀᴄʜʏ ᴏғ ᴄʟᴀssᴇs.

Answered by nitinrexwal
0
Inheritance is a mechanism wherein a new class is derived from an existing class. In Java, classes may inherit or acquire the properties and methods of other classes. A class derived from another class is called a subclass, whereas the class from which a subclass is derived is called a superclass.
Similar questions