Overriding toString method

后端 未结 7 501

I am using .toString to return a string representation of an object, i.e.

jcb.engineMove(move.toString());

will produce e2e4.

What

相关标签:
7条回答
  • 2020-12-12 06:04

    I hope this is not code of toString() method in Move class. The reason of my fear is that you are creating Move object inside of it and invoke recursively toString() method by s+="" + move; (this is same as s+=move.toString()).

    0 讨论(0)
提交回复
热议问题