Which type cannot be used as generics?
Its a 9 letter word :(
2009-07-28 09:49:24
Primitives for example cannot be.
Artem Barger
2009-07-28 09:49:42
Exception...pretty sure thats 9 letters
James
2009-07-28 09:50:07
LOLZ!! tell me if there is a reward for the question
Umair Ahmed
2009-07-28 09:50:22
Well you have 2 to choose from, Anonymous/Exception
James
2009-07-28 09:50:56
I get that anonymous inner classes can't be used, but exceptions certainly can. never tried enums...
roe
2009-07-28 09:51:24
roe - generic types must not be directly derived from a Throwable class...which exceptions are.
James
2009-07-28 09:52:35
A:
All types, except enum types, anonymous inner classes and exception classes, can be generic (reference)
moobaa
2009-07-28 09:52:22
hi, if you actually read the article you would see that you missed http://www.angelikalanger.com/GenericsFAQ/FAQSections/ParameterizedTypes.html#FAQ003
James
2009-07-28 09:54:08
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
2009-07-28 09:56:41
+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
2009-07-28 09:57:34