?? ioapp.java
字號(hào):
/*
* Author: Administrator
* Created: 2004年11月10日 20:15:54
* Modified: 2004年11月10日 20:15:54
*/
import java.io.*;
import java.sql.Timestamp;
public class IOapp
{
public static final String FILE="c:\\hello.txt";
public static void main(String args[])
{
try
{
FileOutputStream outStr = new FileOutputStream(FILE,true);
PrintStream printStream = new PrintStream(outStr);
System.setOut(printStream);
Timestamp now = new Timestamp(System.currentTimeMillis());
System.out.println(now.toString()+"---The text to the file");
outStr.close();
printStream.close();
}
catch(FileNotFoundException e)
{
System.out.println(e);
System.exit(-1);
}
catch(IOException e)
{
System.out.println(e);
System.exit(-1);
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -