A case for == on Class objects

Sending around Class objects can be useful in some cases. Most people don’t know or bother declaring them with types, and that can work too. I recently encountered code like this; the method choose was supposed to take Class objects belonging to a certain class hierarchy, and they used .equals() to find what class object […]