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...

When a private constructer is being inherited from one
class to another class and when the object is instantiated
is the space reserved for this private variable in the
memory??

Answer Posted / ankur sehgal

public class TrialClass
{
protected int i, j;
public TrialClass(int one, int two)
{
i = one;
j = two;
}
public TrialClass(int joo)
{

}
public int squareArea()
{
int side1;
int side2;
side1 = i;
side2 = j;
return side1 * side2;
}

}
public class myDerivedClass : TrialClass

{
int rd;
int dr;
public myDerivedClass(int Age, int ages):base(Age)
{
rd = ages;
dr = Age;
}

}

Try making the base class single parameterized constructor
private.You will get your answer.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use encapsulation in oops?

1025


What are the 4 pillars of oop?

1138


What do you mean by Encapsulation?

1085


Are polymorphisms mutations?

1155


Why is abstraction used?

1089


What is static in oop?

1071


What is difference between multiple inheritance and multilevel inheritance?

1138


Why is polymorphism used?

1035


Is this job good for future? can do this job post grduate student?

2159


What does enum stand for?

1114


Can private class be inherited?

1166


What is encapsulation example?

1048


What is overriding vs overloading?

1058


What is stream in oop?

1297


Why is static class not inherited?

1099