InterviewSolution
Saved Bookmarks
| 1. |
Which of these type parameters is used for a generic class to return and accept any type of object?(a) K(b) N(c) T(d) VThis question was posed to me during a job interview.This is a very interesting question from Type Interface in section Interfaces & Packages of Java |
|
Answer» CORRECT choice is (c) T To explain I would say: T is USED for type, A type variable can be any non-primitive type you specify: any class type, any interface type, any ARRAY type, or even another type variable. |
|