OOP-Klass模型 简略

class Model
{
    public static int a = 1;
    public int b;

    public Model(int b) {
        this.b = b;
    }
}

public static void main(String[] args) {
    int c = 10;
    Model modelA = new Model(2);
    Model modelB = new Model(3);
}

posted @ 2020-12-10 19:25  张艳涛&java  阅读(158)  评论(0编辑  收藏  举报