将一个文本文件的内容按行读出,每读出一行就顺序加上行号,并写入到另外一个文件中。...

Scanner类的nextLine方法不只能够从键盘接收数据,也能够从文件读取数据,且都是以回车为分隔.html 1 public class SY64 { 2 public static void main(String[] args) throws Exception { 3 int lineNumber=0; 4 File f1 = new F
相关文章
相关标签/搜索