public class zhuangshiDemo { public static void main(String[] args) { new superperson(new person()).eat(); } } class person { public void eat() { System.out.println("吃家常饭"); } } class superperson { private person p; public superperson(person p) { this.p=p; } public void eat() { System.out.print("喝酒"); System.out.println("he cha"); p.eat(); } }