CMS专题

多选题Which three will compile and rim without exception?()Aprivate synchronized Object o;Bvoid go() { synchronized() { /* code here */ } }Cpublic synchronized void go() { /* code here */ }Dprivate synchronized(this) void go() { /* code here */ }Evoid go() {

题目
多选题
Which three will compile and rim without exception?()
A

private synchronized Object o;

B

void go() { synchronized() { /* code here */ } }

C

public synchronized void go() { /* code here */ }

D

private synchronized(this) void go() { /* code here */ }

E

void go() { synchronized(Object.class) { /* code here */ } }

F

void go() { Object o = new Object(); synchronized(o) { /* code here */ } }

参考答案和解析
正确答案: C,D
解析: 暂无解析
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Which three methods of source NAT does the Junos OS support?() (Choose three.)

A. interface-based source NAT

B. source NAT with address shifting

C. source NAT using static source pool

D. interface-based source NAT without PAT

E. source NAT with address shifting and PAT


参考答案:A, B, C

第2题:

public class Foo {   public void main (String args) {   system.out.printIn(“Hello World.”);   }   }   What is the result? () 

  • A、 An exception is thrown.
  • B、 The code does no compile.
  • C、 “Hello World.” Is printed to the terminal.
  • D、 The program exits without printing anything.

正确答案:A

第3题:

three of the following universities have large endowments from wealthy benefactors. which is the exception?

A. the State University of New York.

B. Yale University.

C. Princeton University.

D. Harvard University.


参考答案:A

第4题:

public class ExceptionTest {   class TestException extends Exception {}   public void runTest () throws TestException {}   public void test () /* Point X*/ {   runTest ();   }   }   At point X on line 4, which code can be added to make the code compile?()  

  • A、 Throws Exception.
  • B、 Catch (Exception e).
  • C、 Throws RuntimeException.
  • D、 Catch (TestException e).
  • E、 No code is necessary.

正确答案:B

第5题:

Which three methods of source NAT does the Junos OS support?() (Choose three.)

  • A、interface-based source NAT
  • B、source NAT with address shifting
  • C、source NAT using static source pool
  • D、interface-based source NAT without PAT
  • E、source NAT with address shifting and PAT

正确答案:A,B,C

第6题:

In a three-disk volume group, a disk was physically removed from the system without performing any software procedures to properly remove the disk. Which of the following commands should be performed to recover from this error?()

A.extendvg

B.cfgmgr

C.reducevg

D.varyoffvg


参考答案:C

第7题:

int index = 1;   String test = new String;   String foo = test[index];  What is the result?()

  • A、  Foo has the value “”
  • B、 Foo has the value null
  • C、 An exception is thrown
  • D、 The code will not compile

正确答案:B

第8题:

Given:Under which three circumstances will the code on line 37 be executed?()

A.The instance gets garbage collected.

B.The code on line 33 throws an exception.

C.The code on line 35 throws an exception.

D.The code on line 31 throws an exception.

E.The code on line 33 executes successfully.


参考答案:B, C, E

第9题:

1. public class Exception Test {  2. class TestException extends Exception {}  3. public void runTest() throws TestException {}  4. public void test() /* Point X */ {  5. runTest();  6. }  7. }  At Point X on line 4, which code is necessary to make the code compile?()  

  • A、 No code is necessary.
  • B、 throws Exception
  • C、 catch ( Exception e )
  • D、 throws RuntimeException
  • E、 catch ( TestException e)

正确答案:B

第10题:

In a three-disk volume group, a disk was physically removed from the system without performing any software procedures to properly remove the disk. Which of the following commands should be performed to recover from this error?()

  • A、extendvg
  • B、cfgmgr
  • C、reducevg
  • D、varyoffvg

正确答案:C

更多相关问题