單項選擇題下列關于異常的說法正確的是()

A.當一個方法聲明一個異常時,表示該方法一定會拋出該異常
B.若一個方法可能拋出系統(tǒng)異常,那么這個方法可以不聲明異常
C.在catch子句中匹配異常一定是一種精確匹配
D.一旦出現異常,程序運行就會終止


您可能感興趣的試卷

你可能感興趣的試題

1.單項選擇題下面聲明一個整型的二維數組的語句中,”錯誤“的是()

A.int []a[]=new int[10][10];
B.int a[][]=new int[][];
C.int [][]a=new int[10][10];
D.int a[][]=new int[10][10];

2.單項選擇題下列選項中不屬于Java中的基本數據類型的是()

A.byte
B.double
C.boolean
D.string

3.單項選擇題下面代碼中,可以把div中文本設為紅色的是()

A.document.getElementById("divResult").color=red;
B.document.getElementById("divResult").style.color=#10011;
C.document.getElementById("divResult").color=“red”;
D.document.getElementById("divResult").style.color=“red“;

5.單項選擇題下面SQL語句中,表示過慮條件是id=1001或id=1002的是()

A.select*from table where id in(1001   1002)
B.select*from product swhere id between 1001 and 1004
C.select*from table where id not in(1004  1005)
D.select*from table where id=1001 and vend_id=1002