class Computer
{
public void run()
{
System.out.println("电脑运行");
}
}
class Teacher
{
private String name;
private Computer cmpt;
Tercher(Sring name)
{
this.name = name;
cmpt = new Computer();
}
}
中的
cmpt = new Computer();为什么不这个么写Computer cmpt = new Computer();
难道 前面不用写Computer 吗 |