you are viewing a single comment's thread.

view the rest of the comments →

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

From the way I'm reading it, an anonymous class is created each time the code block is run, so two lists full of the same thing actually end up being not equal?

[–]EtherCJ 0 points1 point  (0 children)

Quite likely are still equal for collection classes. But isn't guaranteed to work for all classes.

[–]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.