1.

Which of these instance cannot be created?(a) Integer instance(b) Generic class instance(c) Generic type instance(d) Collection instancesI had been asked this question in exam.I'm obligated to ask this question of Restrictions on Generics in section Generics of Java

Answer»

Right choice is (c) GENERIC type instance

Best explanation: It is not POSSIBLE to CREATE generic type instances. Example – “E obj = NEW E()” will give a compilation ERROR.



Discussion

No Comment Found

Related InterviewSolutions