F
F
floppa3222020-07-06 21:09:21
Java
floppa322, 2020-07-06 21:09:21

Generic: strange wildcard behavior?

5f0367d85d526386471188.png
Good evening everyone.
The stateCache array contains <? extends S> objects, however the array element 's getClass() method returns <? extends Object > what's the matter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-07-06
@Lite_stream

Erasing types. About it is in any textbook that touches on the topic of generalizations.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question