|
How to copy elements from one array to another |
|
|
This Java tip illustrates a method of copying elements of one array into another array.
Developers may sometimes need to transfer the data in source array into target array
for some other use. This tip may be helful for them.
System.arraycopy(sourcearray, 0, targetarray, 0,
Math.min(sourcearray.length, targetarray.length));
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.