Why List<? super Cat> list can't add Animal?

前端 未结 0 488
抹茶落季
抹茶落季 2021-01-23 12:27

I am a novice, I met a problem, do not understand, as follows:

class Animal {}

class Cat extends Animal {}

class Garfield extends Cat {}

public class Demo {
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题