what is inheritence

Answer Posted / rajeshwar

Inheritance is an object oriented concept using which one
can inherit the features of one class to another and add
additional functionallity. This simply reuses the existing
functionallity.

If there is a class A and Class B then class B can inherit
the features of Class A as shown below

Class B extends A
{
// you will get all functions or variables from A
except private variables.

// apart from existing functions you can add new functions

}

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of a weakset object in javascript?

543


What is noscript tag?

530


What is the difference between remove() and removeChild()?

508


What are the different objects used in javascripts?

487


What is a named function in JavaScript? How to define a named function?

539






What is dom in javascript?

537


What is the difference between java & javascript?

522


How to create array in JavaScript?

553


How to prevent modification of an object in Javascript?

558


What is a prompt box in javascript?

518


Why is it called javascript?

489


Write JavaScript code to use file system in binary format?

2123


What is the similarity between the 1st and 2nd statement?

512


What does two exclamation marks mean in javascript?

477


How to remove the event listener?

537