java public private protected default

 

   同一个类  同一个包  不同包的子类  不同包的非子类
 private   √      
 default  √  √    
protected   √  √  √  
public   √  √  √  √
posted @ 2018-10-24 09:04  关玉真  Views(99)  Comments(0)    收藏  举报