⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debug8_2.java

📁 程序练习中包括书中实例程序代码和练习中要用到的代码,是压缩文件
💻 JAVA
字号:
package questions.c8;
import java.io.*;
public class Debug8_2 {
   public static void main( String[] args )
         throws IOException {
      if ( args.length >= 2 ) {
         Reader  input;
         Writer output;
         String inputLine;
         input = new FileReader( args[0] );
         output = new FileWriter( args[1] );
         inputLine = input.readLine();
         try {
            while ( inputLine != null ) {
               output.println( "Line length = "
                              + inputLine.length() );
               inputLine = input.readLine();
            }
         }
         catch( IOException iox ) {
            System.out.println( iox );
         }
         finally {
            input.close();
            output.close();
         }
      } else {
         System.err.println( "Usage is <input_file> "
                             + "<output_file>" );
      }
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -