Tag: programming languages

Questions Related to programming languages

  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 and Y are either both classes or both interfaces

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

  4. None of these


Correct Option: B
  1. Interface can extend one or more interfaces

  2. Interface can extend one or more class

  3. Interface cannot implement a class or interface

  4. All of the above


Correct Option: A
  1. Cohesionn is the OO principle most closely associated with hiding implementation details

  2. Cohesion is the OO principle most closely associated with making sure that classes know about other classes only through their APIs

  3. None of these

  4. Cohesion is the OO principle most closely associated with making sure that a class is designed witha single well focussed principle


Correct Option: D