Reputation: 23
I have encapsulated variables in a private data class inside of a public data structure, if I have a public method in the private class, what can access that method?
If I have a class that can access the private object through a get method in the public class can the first object access the public get or set method in the private class?
If you need any other information please let me know.
Upvotes: 0
Views: 447
Reputation: 3433
Anything with access to the private
member type will have access to its public
members in turn.
Upvotes: 1