Why can't I cast an array of Objects to an array of a generic subclass of a generic class?

后端 未结 0 1788
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 15:04

This code is valid. It compiles with a "unchecked or unsafe operations" warning.

class Foo {
  T[]         


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