local Random = _plugins:loadClass("kotlin.random.Random") local words = _objectWrappers:wrap(_arrays:arrayOf(_plugins:loadClass("java.lang.String"), "hello", "world", "kotlin")) -- 打乱数组元素的顺序 words:shuffle(Random.Default) -- 打乱后的数组: ::: (随机结果) words:forEach(function(it) _console:log(it) end)