伴鱼校园招聘笔试题

综合知识·Java工程师 · 历年真题改编 · 题号 42335
单选题综合知识Java工程师难度 3真题改编 · 2023中大厂

题目

给定以下JAVA代码,这段代码运行后输出的结果是() public class Test { public static int aMethod(int i)throws Exception { try{ return i / 10; } catch (Exception ex) { throw new Exception("exception in a Method"); } finally{ System.out.printf("finally"); } } public static void main(String [] args) { try { aMethod(0); } catch (Exception ex) { System.out.printf("exception in main"); } System.out.printf("finished"); } }

选项4 个

Aexception in main finished
Bfinally finished
Cexception in main finally
Dfinally exception in main finished
🔒 答案与解析:登录后可查看本题答案、解析与考点讲解,并可在线作答自动判分 登录 / 注册
‹ 上一题 返回公务员考试·行测真题 下一题 ›

同类型题目综合知识·Java工程师 · 继续练习

题目免费浏览 · 整套练习与模拟考登录后开始 · 答案与解析登录后可见