📜  java protected private public - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:09.653000             🧑  作者: Mango

代码示例1
public      >> class, package, subclass (same pkg), subclass (diff pkg), world
protected   >> class, package, subclass (same pkg), subclass (diff pkg)
no modifier >> class, package, subclass (same pkg)
private     >> class