Combine two integer arrays into one array in java

后端 未结 12 2159
借酒劲吻你
借酒劲吻你 2020-12-21 04:03

I\'ve seen similar questions and none provide the answer that I\'m looking for, so I apologize in advance if this is considered a duplicate. I\'m trying to combine arrays {1

12条回答
  •  再見小時候
    2020-12-21 04:29

    Don't do it yourself, use System.arrayCopy() to copy both arrays into a new array of the combined size. That's much more efficient, as it uses native OS code.

提交回复
热议问题