多选题

以下程序运行的输出结果是class&nbspBusinessExcept...

发布于 2022-03-03 17:16:27

以下程序运行的输出结果是
class BusinessException extends Exception{}

class SubBusinessException extends BusinessException{}

public class Test {
    public static void main(String[] args) {
        System.out.print(testException())
    }

    public static String testException() {
        try {
            try {
                throw new SubBusinessException()
            } catch (BusinessException re) {
                return "桔子"
            } finally {
                throw new BusinessException()
            }
        } catch (SubBusinessException re) {
            System.out.print("捕获SubBusinessException")
        } catch (BusinessException re) {
            System.out.print("捕获BusinessException")
        } finally {
            return "乐信"
        }
    }
}

登录后免费查看答案
关注者
0
被浏览
11
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看