That's true, but instanceof is redundant here, since we must check getClass() to verify equality. So, by the same argument, instanceof is dead code.