Questions Related to technology

Multiple choice technology
  1. Line 92 will not execute.

  2. The connection will not be retrieved in line 85.

  3. The resource connection will not be closed on line 88.

  4. The enclosing method will throw an exception to its caller

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology
  1. The instance gets garbage collected.

  2. The code on line 33 throws an exception

  3. The code on line 35 throws an exception.

  4. The code on line 31 throws an exception

  5. The code on line 33 executes successfully.

Reveal answer Fill a bubble to check yourself
B,C,E Correct answer
Multiple choice technology
  1. Exception

  2. A,B,Exception

  3. Compilation fails because of an error in line 20.

  4. Compilation fails because of an error in line 14.

  5. A NullPointerException is thrown at runtime

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology
  1. assert value == null;

  2. assert value != null, "value is null";

  3. if (value == null) {throw new AssertionException("value is null");}

  4. if (value == null) {throw new IllegalArgumentException("value is null");}

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology
  1. end

  2. compilation fails

  3. exception end

  4. exception test end

  5. A Throwable is thrown by main.

  6. An Exception is thrown by main.

Reveal answer Fill a bubble to check yourself
E Correct answer
Multiple choice technology
  1. compilation fails

  2. pi is bigger than 3

  3. An Exception occurs at runtime

  4. pi is bigger than 3. Have a nice day

  5. pi is not bigger than 3. Have a nice day

Reveal answer Fill a bubble to check yourself
A Correct answer
Multiple choice technology
  1. int Long

  2. Short Long

  3. Compilation fails

  4. An Exception thrown at runtime

Reveal answer Fill a bubble to check yourself
A Correct answer
Multiple choice technology
  1. The value of b is 2.

  2. The value of a is 3.14.

  3. The value of b is 2.00.

  4. The value of a is 3.141

  5. The value of a is 3.1416

  6. The value of b is 2.0000

Reveal answer Fill a bubble to check yourself
C,E Correct answer