Posted By:
Thanigai_Venkatesan
Posted On:
Thursday, June 7, 2001 11:30 AM
Copying elements from One Array to Another Array can be done using
System.arraycopy(src, 0, dst, 0, Math.min(src.length, dst.length));
src - name of the source Array from where it has to copy.
0 - Starting Index from where it has to start in source array.
dst - name of the destination Array to where it has to copy.
0 - Starting Index in the destination Array from where it will get copied.
Math.min(src.length, dst.length) - the number of elements to be copied is determined by the length of the array which has minimum.
Hope this will helping you in copying the array. If you still have problem let me know, we can try to figure out.
Cheers.