Questions Related to technology

Multiple choice technology programming languages
  1. b = (Number instanceof s);

  2. b = (s instanceof Short);

  3. b = s.instanceof(Short);

  4. b = (s instanceof Number);

  5. b = s.instanceof(Object);

  6. b = (s instanceof String);

Reveal answer Fill a bubble to check yourself
B,D Correct answer
Multiple choice technology programming languages
  1. Only one compilation will succeed.

  2. Exactly two compilations will succeed.

  3. Exactly three compilations will succeed.

  4. All four compilations will succeed.

  5. No compiler warnings will be produced.

  6. At least one compiler warning will be produced.

Reveal answer Fill a bubble to check yourself
B,F Correct answer
Multiple choice technology programming languages
  1. hi

  2. hi hi

  3. hi hi hi

  4. Compilation fails

  5. hi, followed by an exception

  6. hi hi, followed by an exception

Reveal answer Fill a bubble to check yourself
F Correct answer
Multiple choice technology programming languages
  1. Compilation succeeds.

  2. Compilation fails due only to an error on line 3

  3. Compilation fails due only to an error on line 4

  4. Compilation fails due only to an error on line 5

  5. Compilation fails due to errors on lines 3 and 5

  6. Compilation fails due to errors on lines 3, 4, and 5

Reveal answer Fill a bubble to check yourself
A Correct answer
Multiple choice technology programming languages
  1. true true

  2. false true

  3. true false

  4. false false

  5. Compilation fails.

  6. An exception is thrown at runtime

Reveal answer Fill a bubble to check yourself
A Correct answer
Multiple choice technology programming languages
  1. 343 340 340

  2. 343 340 342

  3. 343 341 342

  4. 343 341 340

  5. Compilation fails.

  6. An exception is thrown at runtime

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology programming languages
  1. After line 8 runs

  2. After line 9 runs.

  3. After line 10 runs.

  4. After line 11 runs.

  5. An exception is thrown at runtime.

  6. Never in this program

Reveal answer Fill a bubble to check yourself
E Correct answer