temp.txt

来自「java 的好东西,,开发的基本语言语法教程」· 文本 代码 · 共 23 行

TXT
23
字号
/**
 * 拷贝文件 到temp.txt中
 */

import java.io.*;

public class CopyFile{
	public static void main(String[] args){
		try{
			FileInputStream fis= new FileInputStream("CopyFile.java");
			FileOutputStream fos = new FileOutputStream("temp.txt");
			int read = fis.read();
			while(read !=-1){
				fos.write(read);
				read=fis.read();
			}
			fis.close();
			fos.close();
		}catch(IOException e){
			System.out.println(e);
		}
	}
}

⌨️ 快捷键说明

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