Anonymous overloading in Java