課程
/后端開發(fā)
/Java
/Java入門第三季
就是老師課程里講的
2016-11-07
源自:Java入門第三季 1-3
正在回答
那個(gè),右邊有資料下載,里面有老師講的所有的代碼
花開半夏37 提問者
public int test3(){
int divider=10;
int result=100;
try{
while(divider>-1){
divider--;
result=result+100/divider;
}
catch(Exception e){
e.printStackTrace();//輸出異常的具體信息
System.out.println("拋出異常了");
}finally{
System.out.println("這是finally?。?!哈哈?。?);
System.out.println("我是result,我的值是:"+result);
return 1111;
舉報(bào)
Java中你必須懂得常用技能,不容錯(cuò)過的精彩,快來加入吧
2 回答try...catch
3 回答try catch
1 回答try catch
2 回答Try catch
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-11-07
那個(gè),右邊有資料下載,里面有老師講的所有的代碼
2016-11-07
public int test3(){
int divider=10;
int result=100;
try{
while(divider>-1){
divider--;
result=result+100/divider;
}
}
catch(Exception e){
e.printStackTrace();//輸出異常的具體信息
System.out.println("拋出異常了");
}finally{
System.out.println("這是finally?。?!哈哈?。?);
System.out.println("我是result,我的值是:"+result);
}
return 1111;
}