2007-11-25から1日間の記事一覧
こんな感じでコメントがあると public class test { /** テスト */ int a; } こんな感じでコメントがついてきます public class test { /** テスト */ private int a; public /** テスト */ int getA() { return a; } public void setA(int a) { this.a = a;…
こういうコードを書いて public class RefTest { class A{ int h; } class B extends A{ void m(){ System.out.println(h); } } } フィールドをカプセル化で、変数をprivateにしつつ「フィールドがアクセス可能な時もアクセス用メソッドを使用」のチェックを…