开发者

Clone arr3----> store the result in a variable arr6 Would this be correct?

开发者 https://www.devze.com 2023-03-16 14:16 出处:网络
Clone arr3---开发者_StackOverflow社区-> store the result in a variable arr6 static long[] arr6 = (long[])arr3.clone();

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消