Adam Hurwitz
1 min readOct 12, 2019

--

What helped me understand variance annotation / modifiers was thinking about what type of scope (specific or broad) are being saved.

Producers

  • Uses out
  • Supertype (broad) saves subtype (specific)

Consumers

  • Uses in
  • Subtype (specific) saves supertype (broad)

This post was great, in addition to Baeldung’s guide, in order to understand the fundamentals.

--

--

Adam Hurwitz
Adam Hurwitz

Written by Adam Hurwitz

An account about nothing | Researcher and product consultant

No responses yet