Tag: programming languages

Questions Related to programming languages

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
Multiple choice technology programming languages
  1. Shape s = new Shape(); s.setAnchor(10,10); s.draw();

  2. Circle c = new Shape(); c.setAnchor(10,10); c.draw();

  3. Shape s = new Circle(); s.setAnchor(10,10); s.draw();

  4. Shape s = new Circle(); s->setAnchor(10,10); s->draw();

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology programming languages
  1. A. double getSalesAmount() { return 1230.45; }

  2. B. public double getSalesAmount() { return 1230.45; }

  3. C. private double getSalesAmount() { return 1230.45; }

  4. D. protected double getSalesAmount() { return 1230.45; }

Reveal answer Fill a bubble to check yourself
B,D Correct answer
Multiple choice technology programming languages
  1. . public class Employee extends Info implements Data { public void load() { /do something/ }

  2. public class Employee implements Info extends Data { public void load() { /do something/ }

  3. public class Employee extends Info implements Data { public void load() { /*do something */ }

  4. public class Employee implements Info extends Data { public void Data.load() { /*d something */ }

Reveal answer Fill a bubble to check yourself
A Correct answer
Multiple choice technology programming languages
  1. public class Circle implements Shape { private int radius;

  2. public abstract class Circle extends Shape { private int radius;

  3. public class Circle extends Shape {

  4. public abstract class Circle implements Shape {

Reveal answer Fill a bubble to check yourself
B,C Correct answer
Multiple choice technology programming languages
  1. go in Goban go in Sente go in Sente

  2. go in Sente go in Sente go in Goban

  3. go in Sente go in Goban go in Goban

  4. D. go in Goban go in Goban go in Sente

Reveal answer Fill a bubble to check yourself
C Correct answer