Answer Posted / prabhukalyan dash
Inheritence is the process by which one class can acquired
the proporties of other.and it is used for Reusability i.e
can add more functionality.
Base class is the existing class where as the class which
inherits from the base class is known as Derived class.
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 ? | 2 Yes | 1 No |
Post New Answer View All Answers
How to make elements invisible?
What is the Infinity property used for in Javascript?
What is the difference between local storage & session storage?
If 2 methods have same name and same number of parameters, which one will be executed first?
What would be the result of 3+2+”7″?
Whether JavaScript has concept level scope?
How do I activate javascript on my phone?
Event bubbling and Event Capturing in JavScript?
What are JavaScript Cookies?
What is purpose of onerror event handler in javascript?
How do I use an external javascript file?
Can javascript code be broken in different lines?
Is function a data type in javascript?
Why javascript is called as script for all browsers?
Where are cookies actually stored on the hard disk?