-
Which of these is an correct way of defining generic class?
-
- class name[T1, T2, …, Tn] { /* … */ }
- class name(T1, T2, …, Tn) { /* … */ }
- class name{T1, T2, …, Tn} { /* … */ }
- class name { /* … */ }
- None of these
Correct Option: D
The type parameter section, delimited by angle brackets (<>), follows the class name. It specifies the type parameters (also called type variables) T1, T2, …, and Tn.