Clone arr3----> store the result in a variable arr6 Would this be correct?
Clone arr3---开发者_StackOverflow社区-> store the result in a variable arr6
static long[] arr6 = (long[])arr3.clone();
The above will work if its declared as part of a class variable and arr3 is also of type long[]
. It will not work if this statement is in a static or instance method. Is there any particular reason your making it static. If not you may want to drop static
.
You are best off testing it out yourself and making small changes to see what the effect is. That way you will really understand if it works or not.
精彩评论