Tag: web technology

Questions Related to web technology

Multiple choice technology web technology
  1. the normal class representation with a dotted arrow pointing at the template parameter classes

  2. the normal class representation but shaded grey.

  3. the normal class representation with a dotted outline and the names of its parameter classes listed on the top right-hand corner.

  4. the normal class representation with a rectangular box in its top left-hand corner.

  5. Its a trick question - parameterized classes can't be specified in the UML notation.

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology web technology
  1. The before() method will print 1 2

  2. The before() method will print 1 2 3

  3. The before() method will print three numbers, but the order cannot be determined

  4. The before() method will not compile

  5. The before() method will throw an exception at runtime

Reveal answer Fill a bubble to check yourself
E Correct answer
Multiple choice technology web technology
  1. Change the Carnivore interface to interface Carnivore<E extends Plant> extends Hungry<E> {}

  2. Change the Herbivore interface to interface Herbivore<E extends Animal> extends Hungry<E> {}

  3. Change the Sheep class to class Sheep extends Animal implements Herbivore<Plant> { public void munch(Grass x) {} }

  4. Change the Sheep class to class Sheep extends Plant implements Carnivore<Wolf> { public void munch(Wolf x) {} }

  5. Change the Wolf class to class Wolf extends Animal implements Herbivore<Grass> { public void munch(Grass x) {} }

  6. No changes are necessary

Reveal answer Fill a bubble to check yourself
B Correct answer
Multiple choice technology web technology
  1. List<List<Integer>> table = new List<List<Integer>>();

  2. List<List<Integer>> table = new ArrayList<List<Integer>>();

  3. List<List<Integer>> table = new ArrayList<ArrayList<Integer>>();

  4. List<List, Integer> table = new List<List, Integer>();

  5. List<List, Integer> table = new ArrayList<List, Integer>();

  6. List<List, Integer> table = new ArrayList<ArrayList, Integer>();

Reveal answer Fill a bubble to check yourself
B Correct answer
Multiple choice technology web technology
  1. return new ArrayList<Inn>();

  2. return new ArrayList<Hotel>();

  3. return new ArrayList<Object>();

  4. return new ArrayList<Business>();

Reveal answer Fill a bubble to check yourself
B Correct answer
Multiple choice technology web technology
  1. "X extends Y" is correct if and only if X is a class and Y is an interface

  2. "X extends Y" is correct if and only if X is an interface and Y is a class

  3. "X extends Y" is correct if X and Y are either both classes or both interfaces

  4. "X extends Y" is correct for all combinations of X and Y being classes and/or interfaces

Reveal answer Fill a bubble to check yourself
C Correct answer
Multiple choice technology web technology
  1. -124

  2. -134

  3. -424

  4. -434

  5. -444

  6. Compilation fails

Reveal answer Fill a bubble to check yourself
D Correct answer