Are private class-level variables inherited?

Answers were Sorted based on User's Feedback



Are private class-level variables inherited?..

Answer / venu gopal

Yes, but they are not accessible, so looking at it you can
honestly say that they are not inherited. But they are.

Is This Answer Correct ?    18 Yes 0 No

Are private class-level variables inherited?..

Answer / suresh.gv

Yes Private Variables are inherited to the Derived Class.

But we can't access them on Derived Class

Is This Answer Correct ?    9 Yes 1 No

Are private class-level variables inherited?..

Answer / duc nguyen

according to "http://www.velocityreviews.com/forums/t130343-question-about-inheritance-of-private-variables.html"

"According to the Java Language Specification, the definition of "inherited"
is such that the data member is available by subclasses. Using this
definition, private members are not inherited, HOWEVER, they are 'there',
that is, instances of the subclass contains the data that is held by the
private member - it is just not exposed by the superclass"

Is This Answer Correct ?    3 Yes 0 No

Are private class-level variables inherited?..

Answer / kiran

private and protected members are inherited

Is This Answer Correct ?    4 Yes 2 No

Are private class-level variables inherited?..

Answer / kirti

Yes, but they are not accessible. Although they are not visible or accessible via the class interface, they are inherited.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Can we assign null value to integer?

0 Answers  


What is strong name in c# and how can we use it?

0 Answers   DELL,


Define delegation in .net?

0 Answers  


What are sorted lists?

0 Answers  


Illustrate serialization?

0 Answers  






What is .dbml file?

0 Answers  


Why are there five tracing levels in System.Diagnostics.TraceSwitcher?

1 Answers  


Explain the difference between a struct and a class?

0 Answers  


What is code verification?

0 Answers  


If you define integer variable and a object variable and a structure then how those will be plotted in memory ?

1 Answers  


Is XML case-sensitive?

3 Answers   Wipro,


When should you use generics?

0 Answers  


Categories