Questions Related to technology

Multiple choice technology programming languages
  1. Compilation fails.

  2. An exception is thrown at runtime

  3. doStuffx = 6 main x = 6

  4. doStuffx = 5 main x = 5

Reveal answer Fill a bubble to check yourself
D Correct answer
Multiple choice technology programming languages
  1. import com.sun.scjp.Geodetics;public class TerraCarta {public double halfway(){ return Geodetics.DIAMETER/2.0; } }

  2. import static com.sun.scjp.Geodetics;public class TerraCarta {public double halfway() { return DIAMETER/2.0; } }

  3. import static com.sun.scjp.Geodetics. *;public class TerraCarta {public double halfway() { return DIAMETER/2.0; } }

  4. package com.sun.scjp;public class TerraCarta {public double halfway() { return DIAMETER/2.0; } }

Reveal answer Fill a bubble to check yourself
A,C Correct answer
Multiple choice technology programming languages
  1. Foo { public int bar() { return 1; } }

  2. new Foo { public int bar() { return 1; } }

  3. newFoo() { public int bar(){return 1; } }

  4. new class Foo { public int bar() { return 1; } }

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology programming languages
  1. The code compiles and the output is 2

  2. If lines 16, 17 and 18 were removed, the code would compile and

  3. If lines 24, 25 and 26 were removed, the code would compile and the output would be 1

  4. D. If lines 24, 25 and 26 were removed, compilation would fail

Reveal answer Fill a bubble to check yourself
A,B,C Correct answer
Multiple choice technology programming languages
  1. import sun.scjp.Color.*;

  2. import sun.scjp.Color; import static sun.scjp.Color.*;

  3. import sun.scjp.Color; import static sun.scjp.Color.GREEN;

  4. import static sun.scjp.Color.*;

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