inner and anonymous classes in Java