How to make clear in a constructor, that an object can be inserted as well as all subclasses of that object?

前端 未结 0 1559

I\'m trying to make it possible to initiate an instance of the class Function like this.

Function chain = new CosineFunction(new SquareRootFunction(new SineFuncti         


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