Calling varargs

Report a typo

You are given a method with one vararg:

public static void method(int... vararg) {
    System.out.println(vararg.length);
}

Match the calls of this method and their results.

Match the items from left and right columns
method(0);
method(1, 2, 3);
method(new int[] { 1, 2 });
method();
method(null);
The method throws an exception.
1
3
0
2
___

Create a free account to access the full topic