Answer the question
In order to leave comments, you need to log in
How to substitute another value by index into an array?
I can't solve the problem, please help me write the code
Answer the question
In order to leave comments, you need to log in
int[] source = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int[] dest = new int[source.length];
System.arraycopy(source, 1, dest, 0, source.length - 1);
System.out.println(Arrays.toString(dest));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question