Given the following method, which of the method calls return 2? (Choose all that apply)
public int howMany(boolean b, boolean... b2) {
return b2.length;
}
D, G.
D passes the initial parameter plus two more to turn into a vararg array of size 2.
G passes the initial parameter plus an array of size 2.
A does not compile because it does not pass the initial parameter.
E and F do not compile because they do not declare an array properly. It should be new boolean[] {true}.
Option B creates a vararg array of size 0 and option C creates a vararg array of size 1.