📜  教科书中的简单文本格式化程序 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:46.992000             🧑  作者: Mango

代码示例1
import java.io.*; import java.util.*; /** * Fmt - format text (like Berkeley Unix fmt). */ public class Fmt { /** The maximum column width */ public static final int COLWIDTH=72; /** The file that we read and format */ BufferedReader in; /** If files present, format each, else format the standard input. */ public static void main(String[] av) throws IOException { if (av.length == 0) new Fmt(System.in).format( ); else for (int i=0; i