Java中控制可见性的修饰符总结
Here is a summary of the four access modiers in Java that control visibility:
Visible to the class only (private).
Visible to the world (public).
Visible to the package and all subclasses (protected).
Visible to the package—the (unfortunate) default. No modiers are needed.