更多“A:Finally B:Certainly C:Luckily D:Naturally”相关问题
  • 第1题:

    Luckily, there was _________ water in the bottle.

    A.a little

    B.little

    C.few

    D.a few


    参考答案:A

  • 第2题:

    Given1.publicclassFoo{2.publicstaticvoidmain(String[]args)}3.try{return;}4.finally{Syste.out.printIn(Finally”);}5.}6.}Whatistheresult()?

    A.Theprogramrunsandprintsnothing.

    B.Theprogramrunsandprints“Finally”.

    C.Thecodecomiles.Butanexceptionisthrownatruntime.

    D.Thecodewillnotcompilebecausethecatchblockismissing.


    参考答案:B

  • 第3题:

    publicclassFoo{publicstaticvoidmain(String[]args){try{return;}finally{System.out.println(Finally”);}}}Whatistheresult?()

    A.Finally

    B.Compilationfails.

    C.Thecoderunswithnooutput.

    D.Anexceptionisthrownatruntime.


    参考答案:A

  • 第4题:

    下面程序输出的结果是什么? ( ) public class Quiz2 { public static void main(String args[]) { try {throw new MyException(); }catch(Exception e) { System.out.println("It's caught!"); }finally{ System.out.println("It's finally caught!"); } } } class MyException extends Exception{}

    A.It's finally caught!

    B.It's caught!

    C.It's caught!/It's finally caught!

    D.无输出


    正确答案:C
    解析:本题是对异常处理基本知识的考查。本程序中创建了一个异常类MyException,它的祖先类是Exception。在程序中,程序先发出异常MyException,下面是catch捕获异常,但是catch列表中并没有与之对应的MyExcepfion,但是有一个Exception,它是MyException的祖先类。如果有多种异常需要捕获,在安排catch语句的顺序时要注意,应该首先捕获最特殊的类,然后逐渐一般化。例如,IOExcepfion类是FileNotFoundException类的父类;就应该首先捕获FileNotFoundException异常,然后捕获IOExcepfion异常。所以运行结果是It'scaught!/It'sfinallycaught!

  • 第5题:

    53 A necessarily B completely C.naturally D frequently


    正确答案:A

  • 第6题:

    在java中,惯用语捕获错误的语法try-catch-finally的下列描述正确的是() 

    • A、try-catch必须配对使用
    • B、try可以单独使用
    • C、try-finally可以配对使用
    • D、在try-catch后如果定义了finally,则finally肯定会执行

    正确答案:C,D

  • 第7题:

    在JAVA中,关于捕获错误的语法try-catch-finally的下列描述正确的是()。

    • A、try-catch必须配对使用
    • B、try可以单独使用
    • C、try-finally可以配对使用,finally也可单独使用
    • D、在try-catch后如果定义了finally,则finally肯定会执行

    正确答案:A,D

  • 第8题:

    在C#语言中,下列异常处理结构中有错误的是()。

    • A、catch{}finally{}
    • B、try{}finally{}
    • C、try{}catch{}finally{}
    • D、try{}catch{}

    正确答案:A

  • 第9题:

    下面关于try、catch和finally语句块的组合使用,正确的是()

    • A、try{,}
    • B、try{,}finally{,}
    • C、try{,}catch{,}finally{,}
    • D、try{,}catch{,}catch{,}

    正确答案:B,C,D

  • 第10题:

    多选题
    下面关于try、catch和finally语句块的组合使用,正确的是()
    A

    try{,}

    B

    try{,}finally{,}

    C

    try{,}catch{,}finally{,}

    D

    try{,}catch{,}catch{,}


    正确答案: D,B
    解析: 暂无解析

  • 第11题:

    问答题
    Luckily, I could get the last ticket to the concert.

    正确答案: 幸运的是,我能拿到音乐会的最后一场票。
    解析: 暂无解析

  • 第12题:

    多选题
    在JAVA中,关于捕获错误的语法try-catch-finally的下列描述正确的是()。
    A

    try-catch必须配对使用

    B

    try可以单独使用

    C

    try-finally可以配对使用,finally也可单独使用

    D

    在try-catch后如果定义了finally,则finally肯定会执行


    正确答案: D,A
    解析: 暂无解析

  • 第13题:

    Luckily, there was ____ (冠词)little(一点儿)water in the bottle.


    参考答案:a

  • 第14题:

    publicclassfoo{publicstaticvoidmain(string[]args)try{return;}finally{system.out.printIn(Finally”);}}Whatistheresult?()

    A.Theprogramrunsandprintsnothing.

    B.Theprogramrunsandprints“Finally”

    C.Thecodecompiles,butanexceptionisthrownatruntime.

    D.Thecodewillnotcompilebecausethecatchblockismissing.


    参考答案:B

  • 第15题:

    publicclassfoo{publicstaticvoidmain(stringargs)try{return;}finally{system.out.printIn(Finally”);}}Whatistheresult?()

    A.Theprogramrunsandprintsnothing.

    B.Theprogramrunsandprints“Finally”

    C.Thecodecompiles,butanexceptionisthrownatruntime.

    D.Thecodewillnotcompilebecausethecatchblockismissing.


    参考答案:B

  • 第16题:

    14 try catch finally中 catch和finally的作用


    正确答案:
    答:catch扑获异常,finally不管代码是否出现异常都执行

  • 第17题:

    Eventually,she got a job and moved to London.

    A:Certainly
    B:Finally
    C:Luckily
    D:Naturally

    答案:B
    解析:
    本句意思:最终她找到一个工作,搬到了伦敦。eventually意思为“最终,最后”,finally的意思与其最接近。第2部分:阅读判断

  • 第18题:

    public class foo {   public static void main (stringargs)   try {return;}   finally {system.out.printIn(“Finally”);}   }     What is the result?()  

    • A、 The program runs and prints nothing.
    • B、 The program runs and prints “Finally”
    • C、 The code compiles, but an exception is thrown at runtime.
    • D、 The code will not compile because the catch block is missing.

    正确答案:B

  • 第19题:

    在try-catch-finally结构中,哪个说法不正确()

    • A、可以存在多个catch语句块,表示可以捕捉多种异常
    • B、不能同时没有catch语句块和finally语句块
    • C、结构整体可以当作一条语句,从而可以嵌套在其他try-catch-finally结构中
    • D、在try-catch-finally结构中,不发生异常,finally语句块不会执行

    正确答案:D

  • 第20题:

    在C#程序中〃下列用来处理异常的结构〃错误的是()。

    • A、catch{}finally{}
    • B、try{}finally{}
    • C、try{}catch{}finally{}
    • D、try{}catch{}

    正确答案:A

  • 第21题:

    单选题
    在C#语言中,下列异常处理结构中有错误的是()。
    A

    catch{}finally{}

    B

    try{}finally{}

    C

    try{}catch{}finally{}

    D

    try{}catch{}


    正确答案: D
    解析: 暂无解析

  • 第22题:

    单选题
    It was a real race ______ time to get the project done. Luckily, we made it.
    A

    over

    B

    by

    C

    for

    D

    against


    正确答案: C
    解析:
    考查介词辨析。句意:为了完成这个项目,我们简直是在和时间赛跑啊。幸运的是,我们做到了。against表示“与……比赛,与……对立”,符合句意。

  • 第23题:

    单选题
    在C#程序中〃下列用来处理异常的结构〃错误的是()。
    A

    catch{}finally{}

    B

    try{}finally{}

    C

    try{}catch{}finally{}

    D

    try{}catch{}


    正确答案: D
    解析: 暂无解析