a86775748
Logo菜鸟
2016-01-20 07:33

java如何获取静态内部类变量

  • java
  • class

public class A{
private B b;

public B getB() {
    return b;
}

public void setB(B b) {
    this.b = b;
}

static class B{
    private C c;
    public C getC() {
        return c;
    }
    public void setC(C c) {
        this.c = c;
    }
}
static class C {
    private Integer a;


    public Integer getA() {
        return a;
    }
    public void setA(Integer a) {
        this.a = a;
    }
}

}
如何获取C类的变量a?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

6条回答