Assume the following API:
package nashorn.test; public class API { public static void test(String string) { throw new RuntimeException(\"Don\'t
This is an ambiguous situation. The second case it is looking for either an array of integers or more than one integer to discern from the first case. You can use method selection to tell Nashorn which case you mean.
API["test(java.lang.Integer[])"](1);