CODEARTS IDE-封装字段:重构前

时间:2024-04-16 15:05:23

重构前

class Person {
    public String name;

    public static void main(String[] args) {
        Person person = new Person();
        person.name = "John";
        System.out.println(person.name);
    }
}
support.huaweicloud.com/usermanual-codeartside/codeartside_01_0151.html