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);
精彩评论