精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • public class Ex3{

    public class Ex3{
    int x;
    public static void main(String ar[])throws Exception{
    int y=0;
    Ex3 c=new Ex3();
    try{
    y=3/c.x;
    y=y+1;}catch(Exception e){
    System.out.println("errors occur!");
    System.out.println("getMessage="+e.getMessage());
    System.out.println("toString="+e.toString());}
    System.out.println("program ends ok");
    System.out.println("the y is:"+y);
    }
    }
    注釋一下每行,不太懂try catch的用法
    其他人氣:744 ℃時(shí)間:2020-05-10 12:45:29
    優(yōu)質(zhì)解答
    public class Ex3{ //類int x; public static void main(String ar[])throws Exception{ //主函數(shù),//throws Exception是遇到異常拋出,如果其他類或函數(shù)用到可以用catch捕//捉到int y=0; Ex3 c=new Ex3(); try{ //在t...
    我來(lái)回答
    類似推薦
    請(qǐng)使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點(diǎn),以保證最佳閱讀效果。本頁(yè)提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機(jī)版