Java class with concrete type as parameter

前端 未结 2 944
长发绾君心
长发绾君心 2020-12-21 13:33

Is there any point in declaring a class with \"concrete\" types as generics?

If yes, what\'s the use for it?

If no, any specific reason why the compiler is

2条回答
  •  庸人自扰
    2020-12-21 14:17

    It's not what you think. You're creating a generic type parameter called Integer which shadows java.lang.Integer.

提交回复
热议问题