Interview Question

Velocity Software Engineer Interview Kansas City, MO

Explain about the Access specifiers in C# or any other

  language?
Tags:
technical, c#, programming
Answer

Interview Answer

1 Answer

0

In java:
Access modifiers are public, protected, private.

Public members are accessible within it's class, outside it's class (includes across packages, subclasses)
Protected members are only accessible within it's class, subclasses and same package.
Private members are only accessible within it's own class. (not even subclasses or same package. But there are ways to go around this.)

Nard on Aug 14, 2012

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up