Tag: web technology

Questions Related to 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.


Correct Option: C

XML is Case-Sensitive Language

  1. True

  2. False


Correct Option: B
  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


Correct Option: E
  1. Change the Carnivore interface to interface Carnivore extends Hungry {}

  2. Change the Herbivore interface to interface Herbivore extends Hungry {}

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

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

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

  6. No changes are necessary


Correct Option: B

Which is true? (Choose all that apply.)

  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


Correct Option: C