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.

DeFi Punk

Love podcasts or audiobooks? Learn on the go with our new app.