Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is inheritence

Answers were Sorted based on User's Feedback



what is inheritence..

Answer / jyothish.b

Creating a new class from an another class...The new class
is called DERIVED class and The parent Class is called
BASE class...

Is This Answer Correct ?    10 Yes 4 No

what is inheritence..

Answer / chaitali

When you use the existting class in new class means when u
inherit the base class in drive class is called
inheritance..
new class is called driveclass & existing class called base
class

Is This Answer Correct ?    6 Yes 2 No

what is inheritence..

Answer / 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

what is inheritence..

Answer / amaresh

inheritance is the capability of a class to use the properties and methods another class, while adding its own functionality.

Is This Answer Correct ?    2 Yes 0 No

what is inheritence..

Answer / 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

what is inheritence..

Answer / lakshmanan

Using extends keyword you can extend Superclass.

Lets go for an example,

Class Pay{
var $Amt=10;
var $M="";
Function CheckAmt($Amt){
$this->Amt=$Amt;
}
}
Class Salary extends Pay{
Function CheckAmt($Amt){
$this->Amt=$Amt;
If ($this->Amt > 1000){
echo "Good Salary";
} else {
echo "Okay Salary";
}
}
}
$CheckP = new Pay;
echo $CheckP->Amt;
echo "<br>";
$CheckP->CheckAmt(1000);
echo $CheckP->Amt;
echo "<br>";
$CheckS = new Salary;
echo $CheckS->CheckAmt(100000);

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More JavaScript Interview Questions

How do you check if a variable is an object

0 Answers  


Write JavaScript code to use file system in binary format?

0 Answers  


What is encodeuri() in javascript?

0 Answers  


What is a closure and why are they so useful to us?

0 Answers  


How to load another html page from javascript?

0 Answers  


What is the difference between innerhtml and append() in javascript?

0 Answers  


The below script is working Internet browser but not working in mozilla plz find that good way... function doSubmit(op){ var rowcount=document.getElementsByName ("parameterTypeId").length; var parameterGrade; var performance; var goal; if(op == "save"){ for (var i=0; i < rowcount; i++) { var param=eval("document.forms [0].parameterGrade"+i); if(param.value != "select"){ return true; } } alert("Please rate atleast one attribute"); return false; }//if ends here

0 Answers  


What is the Difference between HTML and DHTML

15 Answers   TCS,


What is emotional closure?

0 Answers  


How can you read properties of an Object in JavaScript?

0 Answers  


What is the difference between textContent and innerText?

0 Answers  


What is viewstate in javascript?

0 Answers  


Categories