SCJP 6.0 96%
(Connecting the Dots ....)
Tom Reilly wrote:Because instanceof is a runtime thing and generics is a compile time thing?
SCJP 6.0 96%
(Connecting the Dots ....)
Sahil Kapoor wrote:
Tom Reilly wrote:Because instanceof is a runtime thing and generics is a compile time thing?
If this is the case then , it should work, If it would have been vice-versa ie instanceof is a compile time thing and generics is a runtime-thing then the result could be reasoned. But what you are saying , is not supporting the result .
Please do elaborate if i am wrong !!!
Because instanceof is a runtime thing and generics is a compile time thing?
SCJP 6.0 96%
(Connecting the Dots ....)
SCJP 6.0 96%
(Connecting the Dots ....)
Sahil Kapoor wrote:Like tom wrote
Because instanceof is a runtime thing and generics is a compile time thing?
If this is the case then "instance of" should work because compilation happens before runtime. So this means generics kind of thing would be resolved when it comes to runtime and hence could be applied.
But if it would have been vice-versa then...
(Just a Hypothetical view)
Then we could guessed the reason that since instanceof happens at compile time, and generics kind of this is to be resolved at runtime . It could not be applied.
SCJP 6.0 96%
(Connecting the Dots ....)
Sahil Kapoor wrote:
Now at run-time the specific version exists or not ??
I think it must exist, so that we could use it ???
SCJP 6.0 96%
(Connecting the Dots ....)
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |