?? redirecting.java
字號:
package chapter18;
import java.io.*;
public class Redirecting {
public static void main(String args[])throws IOException{
PrintStream console=System.out;
BufferedInputStream in=new BufferedInputStream(new FileInputStream("test2.txt"));
PrintStream out=new PrintStream(new FileOutputStream("testOut.txt"));
System.setIn(in);
System.setOut(out);
System.setErr(out);
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String s;
while((s=br.readLine())!=null){
System.out.println(s);
}
out.close();
System.setOut(console);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -