Access Modifiers
Access modifiers define the scope and visibility of a class or its members.
public: Code is accessible for all classes.private: Code is only accessible within the same class.protected: Code is accessible within the same class or inherited classes.
Why use Private?
Encapsulation! You don't want other parts of your program to accidentally change sensitive data.