Answers for "copy array in another array java java"

0

copy elements from one array to another java

int a[]={10,20,30,40,50};
int b[]=new int[a.length];
//copying one array to another
b=Arrays.copyOf(a,a.length);
Posted by: Guest on December-26-2021
1

copy array in java

public static void arraycopy(Object source_arr, int sourcePos,
                             Object dest_arr, int destPos,
                             int len)
/* Parameters : 
source_arr : array to be copied from
sourcePos : starting position in source array from where to copy
dest_arr : array to be copied in
destPos : starting position in destination array, where to copy in
len : total no. of components to be copied
*/
Posted by: Guest on January-08-2022

Code answers related to "copy array in another array java java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language