?? test.java
字號:
import java.io.*;
class Foo
{
public Foo (String fileName) throws FileNotFoundException,
IOException
{
FileReader fr = new FileReader(fileName);
BufferedReader br = new BufferedReader(fr);
String str = br.readLine();
//...
}
public void scanfile()
{}
}
class Test
{
public static void main(String args[])
{
Foo somefoo = null;
try {
somefoo = new Foo("temp.fil");
}
catch (FileNotFoundException fnfe) { //Catch constructor
//... //failure
}
catch (IOException ioe) { //Catch constructor failure
//...
}
//Use somefoo
somefoo.scanfile();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -