单选题

给定以下JAVA代码,这段代码运行后输出的结果是()publicclass...

发布于 2022-03-03 17:28:26

给定以下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")

    }

}



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

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

去下载看看