let words = $objectWrappers.wrap($arrays.arrayOf($plugins.loadClass("java.lang.String"), "hello", "world", "kotlin")) // 将数组元素连接成字符串,使用 ", " 作为分隔符 let joinedString = words.joinToString(", ", "Words: ", ".", -1, "...", it => it.toString()) // 输出:连接后的字符串: Words: hello, world, kotlin. $console.log("连接后的字符串: ", joinedString)