可以用接口实现:
public class FunctionPointerTest { public static void main(String... args){ Player[] players = new Player[5]; for(int i = 0;i
如果不用这种“函数指针”,以上代码就会是:
public class FunctionPointerTest { public static void main(String... args){ Player[] players = new Player[5]; for(int i = 0;i