char color;
int cpu;
笔记本(char string, int i) {
color = string;
cpu = i;
show笔记本(string, i);
//System.out.println("该笔记本的颜色是" + color + "该笔记本的cpu名称是" + cpu);
}
笔记本() {
}
void show笔记本(char string, int i) {
color = string;
cpu = i;
System.out.println("该笔记本的颜色是" + color + "该笔记本的cpu名称是" + cpu);
测试
笔记本 d= new 笔记本();
d.show笔记本('y',1223);