+ 1
Why members of class are set to 'private' by default? Why not 'public'?
3 ответов
+ 2
To enforce encapsulation. Better safe than sorry I always think.
+ 1
If you want something with default members set to public by default, check out a struct, which is exactly that, a class whose members default to public.
0
You should have to check what's public so that nobody breaks anything