Are they really anonymous?

Anonymous classes are not truly anonymous.

The files that represent them must have names.

However, the establishment of the file names is beyond the control of the programmer.

The names are not known to the program in a way that makes it possible to refer to them by name.

(But having an object of the class, it is possible to learn the name of the class file by calling the getClass method on the object).

File: bk.htm [Next] [Prev]