开发者

Java One Array data to another Array

Basically I need f开发者_Go百科or example to array1 in position 0..9 to contain items form another array from posinion 20..29. How do i do this? I tried playing with for loop but this way i can only get data from the same positions in both arrays.


// copy indices 20-29 from array2 to indices 0-9 in array1
System.arraycopy(array2, 20, array1, 0, 10);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜