Home » JAVA Programming » Generics » Question
  1. Which of the following is an incorrect statement regarding the use of generics and parameterized types in Java?
    1. Generics and parameterized types eliminate the need for down casts when using Java Collections
    2. When designing your own collections class (say, a linked list), generics and parameterized types allow you to achieve type safety with just a single class definition as opposed to defining multiple classes
    3. Generics provide type safety by shifting more type checking responsibilities to the compiler
    4. All of above
    5. None of these
Correct Option: B

When designing your own collections class (say, a linked list), generics and parameterized types allow you to achieve type safety with just a single class definition as opposed to defining multiple classes



Your comments will be displayed only after manual approval.