class Person{private String name;private String country = "CN";public void show(){System.out.println(name+":"+country);}public String getName(){return this.name;}public String setName(){this.name = name;}}class StaticDemo{public static void main(String[] args) {Person p = new Person("小强","CN");p.getname ();p.show();}}这代码有什么问题能不能给我解释下
添加回答
举报
0/150
提交
取消