?? testthrows2.java
字號(hào):
/**
* Description:
* <br/>Copyright (C), 2005-2008, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
public class TestThrows2
{
public static void main(String[] args) throws Exception
{
//因?yàn)閠est()方法聲明拋出IOException異常,
//所以調(diào)用該方法的代碼要么處于try...catch塊中,
//要么處于另一個(gè)帶throws聲明拋出的方法中。
test();
}
public static void test()throws IOException
{
//因?yàn)镕ileInputStream的構(gòu)造器聲明拋出IOException異常,
//所以調(diào)用FileInputStream的代碼要么處于try...catch塊中,
//要么處于另一個(gè)帶throws聲明拋出的方法中。
FileInputStream fis = new FileInputStream("a.txt");
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -