I just found out about a very interesting Java trick:
void method1(Integer... a){ }
So you can give this method as many integers as you want.>
varargs has the least priority. If no other matched method found then only it gets called.It is just like the default case of SWITCH case.