I've checked the book, the arguments for the first two functions is not AA or BB, is an array of AA or BB: It should be like this:
static void sifter(AA[] ... a2) {s += "1"}
static void sifter(BB[] ... b1) {s += "2"}
Attention that AA[] means that it accepts an array of array(AA[]) but not an array of AA. So the answer in the book is correct.
PS: In your code, it's normal that there is a compile error. Since you define both sifter(BB ... b1) and sifter(BB[] b2), the compiler cannot tell which one to choose if you pass an array of BB as argument.