local words = _objectWrappers:wrap(_arrays:arrayOf(_plugins:loadClass("java.lang.String"), "hello", "world", "kotlin")) -- 迭代数组元素及其索引 words:withIndex():forEach(function(it) _console:log("Index: ", it.index, "Word: ", it.value) end) -- 输出: -- Index: 0, Word: hello -- Index: 1, Word: world -- Index: 2, Word: kotlin