# encoding: utf-8 source = $arrays.arrayOf($plugins.loadClass("java.lang.String"), "a", "b", "c", "d", "e") destination = $arrays.newArray($plugins.loadClass("java.lang.String"), 10) sw = $objectWrappers.wrap(source) dw = $objectWrappers.wrap(destination) # 将 source 数组的元素复制到 destination 数组,从 destination 的索引 2 开始,复制 source 的索引 1 到 3 的元素(不包括索引 3) sw.copyInto(dw, 2, 1, 3) $console.log(dw.contentDeepToString()) # 输出:[nil, nil, b, c, nil, nil, nil, nil, nil, nil]