标签:prot The over keyword ble head -name ring boolean
【不変が原則、可変が例外】だから、フィールドが初期化?
public class Foo {
private int count = 1;
private boolean isAdmin = true;
private String message = "";
}
アクセス修飾子 | 同一クラス | 同一パッケージ | サブクラス | すべて |
---|---|---|---|---|
public | 〇 | 〇 | 〇 | 〇 |
protected | 〇 | 〇 | 〇 | × |
指定なし(デフォルト) | 〇 | 〇 | × | × |
private | 〇 | × | × | × |
标签:prot The over keyword ble head -name ring boolean
原文地址:https://www.cnblogs.com/syea/p/11806066.html