Tagged Questions
17
votes
9answers
1k views
Isn't class scope purely for organization?
Isn't scope just a way to organize classes, preventing outside code from accessing certain things you don't want accessed?
More specifically, is there any functional gain to having public, protected, ...
4
votes
3answers
2k views
What is meant by Scope of a variable?
I think of the scope of a variable as -
"The scope of a particular variable is the range within a program's source code in which that variable is recognized by the compiler".
That statement is ...