java: how to create an object of the same type than another one at runtim?

后端 未结 0 1160
梦如初夏
梦如初夏 2021-01-25 00:37

I have a method that accepts a MyObject interface as a parameter. In this method, I want to create an object of the same runtime implementation class. Like this

          


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