1, with a private member variables are modified to prevent external freely modified, an error can not predict. Once the private modifier used, which are free to use this class, but outside of this class can not be used directly. If you need to modify / query is modified private member variables, can be achieved through indirect access, create a bunch of setXxx / getXxx method in this class, pay attention to the definition of setXxx / getXxx there are strict requirements. By indirect access and modification can prevent unreasonable situation, improve the robustness of the code.
Note: If the return value boolean type, use is setXxx / isXXX