网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

What is wrong with the following code?()   class MyException extends Exception {}   public class Qb4ab {   public void foo() {  try {  bar();  } finally {  baz();   } catch (MyException e) {}  }   public void bar() throws MyException {   throw new MyException();  }   public void baz() throws RuntimeException {   throw new RuntimeException();   }   }  

  • A、Since the method foo() does not catch the exception generated by the method baz(), it must      declare the RuntimeException in its throws clause.
  • B、A try block cannot be followed by both a catch and a finally block.
  • C、An empty catch block is not allowed.
  • D、A catch block cannot follow a finally block.
  • E、A finally block must always follow one or more catch blocks.

参考答案

更多 “ What is wrong with the following code?()   class MyException extends Exception {}   public class Qb4ab {   public void foo() {  try {  bar();  } finally {  baz();   } catch (MyException e) {}  }   public void bar() throws MyException {   throw new MyException();  }   public void baz() throws RuntimeException {   throw new RuntimeException();   }   }  A、Since the method foo() does not catch the exception generated by the method baz(), it must declare the RuntimeException in its throws clause.B、A try block cannot be followed by both a catch and a finally block.C、An empty catch block is not allowed.D、A catch block cannot follow a finally block.E、A finally block must always follow one or more catch blocks.” 相关考题
考题 See what you’ve done ! Don’t you have a ______ of right or wrong ? A.feelingB.senseC.thoughtD.knowledge

考题 ______ the toy ________ and see if you can find what's wrong with it. A. Separate ⋯apartB. Cut ⋯into piecesC. Take ⋯.apartD. Tell ⋯apart

考题 —I am sorry to trouble you, sir.—________ A. My pleasure.B. What ‟s wrong with you?C. What seems to be the problem?D. It doesn ‟t matter.

考题 Rose: Hi, Lisa. What's wrong with you?______.Lisa: No, I don't. I've got the flu.

考题 45.1 really want to know_________A. what is wrong with my brotherB. how will he go to Beijing tomorrowC.if had he bought that carD. where did he go yesterday

考题 -What time will the next train leave?-At 8. 19.A. RightB. Wrong

考题 -What are you going to do tomorrow morning?-I saw a film with my son.A. RightB. Wrong

考题 -What’s your job?-I’m a nurse.A. RightB. Wrong

考题 -Your request for compensation made me surprised. What happened -() A、It’s true.B、It’s because of the quality.C、There must be something wrong.

考题 Linda, what’s wrong with your grandmother?().A、 She is not retiredB、 She hurt her leg.C、 She got a new house.

考题 What’s wrong with the goods which David has bought() A. They are not up to the standard.B. They are not loaded on time.C. They are not properly loaded.

考题 –– James: Hi, Harry. ____–– Harry: Hi, James. I just bought a new camping tent. I can ’t wait to use it.A: What’s up?B: What’s on?C: What’s wrong?D: What’s right?

考题 – – We lost in the game.() A.What‘s your feeling?B.What‘s the matter with you?C.Is there something wrong with you?D.Do you feel ok?

考题 What s right for you may be wrong for me, and() . A、oppositeB、on the contraryC、vice versaD、on the other hand

考题 Which of the following desdription is WRONG .about Wi-Fi? ( ).A.Any standard Wi~Fi device. will work anywhere in the world with global operative set of standaedsB.Now most laptops are built with wireless network adapters insideC.One can connect Wi-Fi devices in ad-hoc mode for client-to-client connections without a routerD.Communications between two devices need the involvement of an access point with Wi-Fi

考题 — Excuse me!— _____— How can I get to the nearest post office?A.Yes? B.That’s OK. C.What’s wrong? D.Pardon?

考题 According to the passage, when you get a wrong number in making a long-distance call, you should______.A. check your number and call againB. tell the operator what has happenedC. Ask the operator to put you throughD. Ask the operator what has happened

考题 —_________—Oh,l feel bad. I think I had a headache .A. Can I help you?B. What's wrong with you?C. What are you doing?D. What's this?

考题 Hello, could I speak to Mike please?()A、Who are you?B、Who is speaking?C、What's wrong?D、Why?

考题 Can you () what is wrong with the washing machine?A、find outB、findC、look for

考题 What()wrong with youA、isB、areC、haveD、did

考题 单选题What could be the reason for this()A The listener is not running on the database node.B The TNS_ADMIN environmental variable is set to a wrong value.C The orcl.oracle.com database service is not registered with the listener.D The DEFAULT_DOMAIN parameter is set to a wrong value in the sqlnet.ora file.

考题 单选题—You look worried. What’s wrong?—I went to a job interview yesterday and I ______ the result.A waited forB was waiting forC am waiting forD will wait for

考题 单选题What()wrong with youA isB areC haveD did

考题 单选题A There must be something wrong with the brakes.B It won’t cost much to get it fixed.C She is not sure what is wrong with it.D It was made in the United States.

考题 单选题What is the danger of the confusion in the meaning of science?A With this confusion, people would have wrong political opinions.B With this confusion, young people might get the wrong scientific training.C It would lead to misconceptions in education.D It would result in more scientists than really needed.

考题 单选题The hospital is carrying()tests to find out what’s wrong with her.A overB outC offD away

考题 单选题What’s wrong()the winch?A forB withC toD on