訪問修飾符public,private,protected,以及不寫(默認)時的區別?

修飾符 當前類 同包 子類 其餘包spa public √ √ √ √ protected √ √ √ × default √ √ × × private √ × ×
相關文章
相關標籤/搜索