public protected (default) private 同类 Y Y Y Y 同包 Y Y Y N 异包子类 Y Y N N 异包异类 Y N N N 转载于:https://www.cnblogs.com/newcityboy/p/11184129.html