📄 readjava.java
字号:
import java.io.*;
public class ReadJava {
public static void main(String[] arguments) {
if (arguments.length < 2)
System.out.println("Usage: java ReadJava filename1 filename2");
else {
try {
File inFile = new File(arguments[0]);
FileInputStream in = new FileInputStream(inFile);
File outFile = new File(arguments[1]);
FileOutputStream out = new FileOutputStream(outFile);
boolean eof = false;
while (!eof) {
int input = in.read();
if (input == -1) {
eof = true;
}
else {
out.write(input);
}
}
in.close();
out.close();
} catch (IOException e) {
System.out.println("Error -- " + e.toString());
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -