what is inheritence

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


Please Help Members By Posting Answers For Below Questions

Which is better python or javascript?

487


What are the predefined functions in javascript?

494


Write the point of difference between web-garden and a web-farm?

503


What is the difference between call & apply?

488


What is nodetype in javascript?

494






What Is The Disadvantages Using InnerHTML In JavaScript?

537


Is dart better than javascript?

469


What do ellipses mean in javascript?

451


How do I start a javascript project?

471


Difference between Pure functions Vs. Impure functions in javascript?

500


What typeof returns for a null value?

538


Explain export & import in javascript?

607


How can you convert the string of any base to integer in JavaScript?

521


What is the difference between a web-garden and a web-farm?

501


What is javascript used for on iphone?

482