• C

private and public classes

i had a discussion with a friend about private, protected and public classes. my question to anyone who can clarify this is i say that the declared items in the private part of a class may not be directly accessed outside the class and those in the public part are accessible outside of the class. please let me know if i am true in what i say to clarify this up between us. thanks!
beachbummAsked:
Who is Participating?
 
imladrisCommented:
You are completely true! That is precisely the point of public versus private. Public methods or variables can be used by other classes, private ones cannot.
0
 
beachbummAuthor Commented:
thanks!!!!!!!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.