class Person
{
public void chifan()
{
System.out.println("吃饭");
}
}
class SuperPerson
{
private Person p;
SuperPerson(Person p)
{
this.p = p;
}
public void superChifan()
{
System.out.println("开胃菜");
p.chifan();
System.out.println("甜点");
}
}
class Test
{
public static void main(String[] args)
{
Person p= new Person();
SuperPerson sp = new SuperPerson(p);
sp.superChifan();
}
}
求每一步的注释,3q!!!
|