getClass() will be useful when you want to make sure your instance is NOT a subclass of the class you are comparing with.
一个非常完美的equals方法的写法:
getClass() will be useful when you want to make sure your instance is NOT a subclass of the class you are comparing with.
一个非常完美的equals方法的写法: