Which of the following statements about Generics is correct ?

PYQ RPSC Programmer 2013

Which of the following statements about Generics is correct ?

  1. A.

    Generics are typed subclasses of the classes from the Collections framework.

  2. B.

    Generics are used to parameterize the collections in order to allow for static type checking.

  3. C.

    Generics can be used to perform type checking of the objects in a collection at runtime.

  4. D.

    Generics can be used to iterate over a complete collection in an easy way, using the 'enhanced for' loop.

Attempted by 2 students.

Sign up free to check your answer

Sign up free

Explore the full course: Rpsc Programmer

Loading lesson…