public PrintStream printf(String fmt , Object... args) { return format(fmt, args); }
Object…参数类型与 Object[ ]完全一样。
编译器需要对 printf 的每次调用进行转换, 以便将参数绑定到数组上,并在必要的时候进行自动装箱:
System.out.printf("M Xs", new ObjectO { new Integer(n), "widgets" } );
public PrintStream printf(String fmt , Object... args) { return format(fmt, args); }
Object…参数类型与 Object[ ]完全一样。
编译器需要对 printf 的每次调用进行转换, 以便将参数绑定到数组上,并在必要的时候进行自动装箱:
System.out.printf("M Xs", new ObjectO { new Integer(n), "widgets" } );