getClass() vs. Instanceof in equals()
807580Feb 8 2010 — edited Feb 9 2010As we know there are differing opinions on what is better to use in overriding equals(). getClass() or instanceof for
argument type checking.
I would like to know if there is anyoneone who is strongly in favor of using instanceof instead of getClass()?