What is inheritance?? define it....
Answers
Answered by
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
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
Science,
4 months ago
English,
4 months ago
Political Science,
9 months ago
Social Sciences,
11 months ago
Science,
11 months ago
Math,
11 months ago