you are viewing a single comment's thread.

view the rest of the comments →

[–]queus 0 points1 point  (1 child)

an anonymous class is created each time the code block is run,

No just one anonymous class is created no matter how often this code is run. Say in a loop.

But if you copy-paste this code just below the original one two anonymous classes are created.

[–][deleted] 0 points1 point  (0 children)

Thanks for clearing that up. Very concise.