numbers = _objectWrappers.wrap(_arrays.arrayOf(_plugins.loadClass("java.lang.Long"), 10, 20, 30, 20, 40)) # 查找元素 20 的第一个索引 indexOf20 = numbers.indexOf(20) # 输出:元素 20 的第一个索引: 1 _console.log("元素 20 的第一个索引: ", indexOf20) # 查找元素 50 的索引(如果不存在,则返回 -1) indexOf50 = numbers.indexOf(50) # 输出:元素 50 的索引: -1 _console.log("元素 50 的索引: ", indexOf50)