If a Java class has overloaded methods such as
public class Demo {
public void foo(int a, int b) {
System.out.println("two ints");
}
public void foo(int... args) {
System.out.println("vararg ints");
}
}
Calling demo.foo(1, 2) from Java code gives two ints as expected but from jython code gives vararg ints. The same can be seen with constructors now that vararg constructors are supported.
If a Java class has overloaded methods such as
Calling
demo.foo(1, 2)from Java code givestwo intsas expected but from jython code givesvararg ints. The same can be seen with constructors now that vararg constructors are supported.