Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

array copy java

// java.util.Arrays.copyOf() method is in java.util.Arrays class.
// It copies the specified array, truncating or padding with false
// (if necessary) so the copy has the specified length.
int[] src = {1,2,3,4};
int[] dst = Arrays.copyOf(src, src.length);

// clone() method.
int[] arrClone = src.clone()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array #copy #java
ADD COMMENT
Topic
Name
4+3 =