- 便携打印工具(print、println、printf)
package com.macauley.util;
import java.io.*;
public class Print {
public static void println(Object obj){
System.out.println(obj);
}
public static void println(){
System.out.println();
}
public static void print(Object obj){
System.out.println(obj);
}
public static void print(){
System.out.println();
}
//The new Java SE5 printf() (from C)
public static PrintStream printf(String format, Object... args){
return System.out.printf(format, args);
}
}
- 列表内容
摘自Thinking In Java(Fourth Edition)