单选题 定义一个 Student 类,包含私有属性 nam
参考代码:
publi
privat
privat
publi
return name;
}
publi
this.nam
}
publi
return age;
}
publi
this.ag
}
publi
publi
this.nam
this.age= age;
}
publi
Student s = new Student("张三", 18);
System.out.println("姓名:" + s.nam
System.out.println("学号:" + s.ag
}
}