三、請問下列 Java 程式執行結果為何?(10 分) import java.io.IOException; public class throwException { public static void main(String[] args) throws E { try {E e1 = new E(“here comes e1”); throw e1; System.out.println(“gets here”); } catch(E e1) { System.out.println(“catches e1”);} }//main }//throwException class E extends IOException { E(String message) { super(message); } }// class E

詳解 (共 3 筆)

111年警特高普中鋼調查皆上榜
111年警特高普中鋼調查皆上榜
詳解 #5416737
2022/04/14
輸出: catches e1
(共 16 字,隱藏中)
前往觀看
蔡均易
蔡均易
詳解 #3510972
2019/07/27
執行結果:catches e1 pub...
(共 223 字,隱藏中)
前往觀看
台電-中華-台糖-?
台電-中華-台糖-?
詳解 #3888188
2020/04/17
此程式實際上無法通過編譯。因為編輯器會指...
(共 137 字,隱藏中)
前往觀看