[java] How are Anonymous inner classes used in Java?