`out T` means the type only produces T (you can read T), so it’s covariant (e.g., `List<out Animal>` can hold `List<Dog>`). `in T` means it only consumes T (you can pass T in), so it’s contravariant (e.g., `Comparator<in Dog>`). It prevents unsafe reads/writes.
Expanding on the short answer — what usually matters in practice:
A tiny example (an explanation template):
// Example: discuss trade-offs for "generics-variance:-what-do-`out`-and-`in`-mean-i"
function explain() {
// Start from the core idea:
// `out T` means the type only produces T (you can read T), so it’s covariant (e.g., `List<ou
}