Are private class-level variables inherited?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
I have a class declared as below public class a { public void add() {} } What is the diference between a a1 =new a; and simply a a1;
Explain the ways to deploy an assembly?
What are the 3 elements of delegation?
What is int32 in c#?
Describe the ways of cleaning up objects in c#.
What are extender provider components?
What are the 4 pillars of any object oriented programming language?
What is multiple interface in c#?
How to move to a state-related codebase?
What is get set in c#?
Can a class be protected in c#?
My switch statement works differently! Why?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)