/**
* Created by 言曌 on 2017/8/25.
*/
class Gay {
//招待
public void serve(American american) {
System.out.println("打橄榄球");
System.out.println("吃披萨");
}
//招待
public void serve(Chinese chinese) {
System.out.println("打太极");
System.out.println("吃四川菜");
}
}
class American{
}
class Chinese{
}
public class Demo {
public static void main(String[] args) {
Gay niuniu = new Gay();
American Tom = new American();
Chinese Zhangsan = new Chinese();
niuniu.serve(Tom);//牛牛招待汤姆
niuniu.serve(Zhangsan);//牛牛招待张三
}
}仅供参考啊