Questions Related to technology

Multiple choice technology
  1. Compilation fails

  2. An exception is thrown at runtime.

  3. An instance of Forest is serialized.

  4. An instance of Forest and an instance of Tree are both serialized

Reveal answer Fill a bubble to check yourself
B Correct answer
Multiple choice technology
  1. restore 400

  2. restore 403

  3. restore 453

  4. Compilation fails.

  5. An exception is thrown at runtime

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology
  1. This code is NOT thread-safe

  2. The programmer can replace StringBuffer with StringBuilder with no other changes

  3. This code will perform poorly. For better performance, the code should be rewritten:return "<" + this.name + ">";

  4. This code will perform well and converting the code to use StringBuilder will not enhance the performance

Reveal answer Fill a bubble to check yourself
B Correct answer
Multiple choice technology
  1. It can be any class

  2. No class has access to base

  3. The class must belong to the geometry package

  4. The class must be a subclass of the class Hypotenuse

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology
  1. Hello

  2. Hello World

  3. Compilation fails

  4. Hello World 5

  5. The code runs with no output.

  6. An exception is thrown at runtime

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology
  1. Compilation fails because of an error in line 3

  2. Compilation fails because of an error in line 7

  3. Compilation fails because of an error in line 9

  4. If you define D e = new E(), then e.bMethod() invokes the version of bMethod() defined in Line 5.

  5. If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 5.

  6. If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 9.

Reveal answer Fill a bubble to check yourself
F Correct answer
Multiple choice technology
  1. foofoofoofoofoo

  2. foobarfoobarbar

  3. foobarfoofoofoo

  4. foobarfoobarfoo

  5. barbarbarbarbar

  6. foofoofoobarbar

Reveal answer Fill a bubble to check yourself
D Correct answer