reset password
Author Message
knagrec2
Posts: 51
Posted 16:48 Oct 06, 2018 |

When overriding equality method and checking for equality, do we need to check if they are the same object type using instanceof? Or can we assume the input will be of the correct type?

kknaur
Posts: 540
Posted 16:58 Oct 06, 2018 |

This is something I said during the lecture that you should always check.