what is call-site variance and declaration site variance , which of them differ from bounded wildcard?

Viewed 592

I am learning Scala and it introduced variance. Since Scala runs on JVM, I tried to understand variance in terms of Java, but it lead me to confusion. I need a clear understanding of the following:

  1. What is call-site variance and declaration site variance ?

  2. Which one is supported in Java ?

  3. How are these types different from bounded wildcard or bounded parameter?

  4. How do they differ in Scala and Java?

0 Answers
Related