Why do I have to cast the return of Constructor.newInstance?

后端 未结 0 572
孤城傲影
孤城傲影 2020-12-08 10:12

According to the docs, newInstance() returns a T: https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#newInstance()

So if I have a method that returns T, w

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