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

📄 debug8_1.java

📁 程序练习中包括书中实例程序代码和练习中要用到的代码,是压缩文件
💻 JAVA
字号:
package questions.c8;
import java.io.*;
public class Debug8_1 {
   public static void main( String[] args )
         throws IOException {
      InputStream  input;
      OutputStream output;
      if ( args.length >= 2 ) {
         input = new FileInputStream( args[0] );
         output = new FileOutputStream( args[1] );
      } else {
         input = System.in;
         output = System.out;
      }
      int c;
      try {
         while ( ( c = input.read() ) != -1 ) {
            // change blanks to underscores
            if ( c == ' ' ) {
               c = '_';
            }
            output.write( c );
         }
      }
      catch( IOException iox ) {
         System.out.println( iox );
      }
      finally {
         input.close();
         output.close();
      }
   }
}

⌨️ 快捷键说明

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