好未来校园招聘笔试题

综合知识 · 历年真题改编 · 题号 42058
单选题综合知识难度 3真题改编 · 2023中大厂

题目

下面代码输出结果是: using System; using System.Collections; using System.Collections.Generic; namespace TestDemo { class Program { class U { ~U() { Console.WriteLine("removed"); } public U() { throw new NotImplementedException(); } } private static void Foo() { try { var u = new U(); GC.Collect(); } catch { Console.WriteLine("catch"); GC.Collect(); } finally { Console.WriteLine("finally"); } } static void Main(string[] args) { Foo(); GC.Collect(); } } }

选项4 个

Acatch removed finally
Bcatch finally
Ccatch finally removed
Dremoved catch finally
🔒 答案与解析:登录后可查看本题答案、解析与考点讲解,并可在线作答自动判分 登录 / 注册
‹ 上一题 全部专题 下一题 ›

同类型题目综合知识 · 继续练习

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