?? sample.java
字號(hào):
public class Sample{
public void methodA(int money)throws SpecialException{
if(--money<=0) throw new SpecialException("Out of money");
System.out.println("methodA");
}
public void methodB(int money) throws SpecialException{
methodA(money);
System.out.println("methodB");
}
public static void main(String args[])throws SpecialException{
new Sample().methodB(1);
}
}
/****************************************************
* 作者:孫衛(wèi)琴 *
* 來(lái)源:<<Java面向?qū)ο缶幊?gt;> *
* 技術(shù)支持網(wǎng)址:www.javathinker.org *
***************************************************/
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -