views:

112

answers:

4

Which type cannot be used as generics?

A: 

Anonymous inner classes, exception types and enum types.

James
Its a 9 letter word :(
Primitives for example cannot be.
Artem Barger
Exception...pretty sure thats 9 letters
James
LOLZ!! tell me if there is a reward for the question
Umair Ahmed
Well you have 2 to choose from, Anonymous/Exception
James
I get that anonymous inner classes can't be used, but exceptions certainly can. never tried enums...
roe
roe - generic types must not be directly derived from a Throwable class...which exceptions are.
James
A: 

All types, except enum types, anonymous inner classes and exception classes, can be generic (reference)

moobaa
hi, if you actually read the article you would see that you missed http://www.angelikalanger.com/GenericsFAQ/FAQSections/ParameterizedTypes.html#FAQ003
James
The eighth letter of the answer is the clue to the next question.The question is During method Overriding the actual types of the method as well as it’s ____________ type are accepted in the overridden definitionThe answer for the above question is 9 letters.I have earlier put as transient.But now this confuses me..The third letter of this question coincides with eight letter of my origianl question
+2  A: 

It is not clear what question you are asking. Some of the answers above assume you are asking, what types cannot be generic (i.e. cannot have a generic type parameter).

However, when I read your question, I thought you are asking, what types cannot be used as generic type parameters -- to which the answer is: primitives

newacct
Good answer mate...You are right
A: 

primitive

(a random 9-letter word)

dfa
you are right...Thanks for that