Equality – equals() and deepequals() in Java 7

The method statement states:

Which (for me) suggests that if they maintain references to each object, using the equals () method is also equal And every object they refer to is equal And

So Equals is determined by using the equals method of the first parameter

And What's the difference between equals()? Suppose we appropriately describe each field equal to an object when it is equal to another object

You can provide an example to illustrate objects Deepequals() and objects What is the difference between equals()?

Solution

If at least one parameter in the deepequals method is not an array, objects Deepequals and objects Equals is the same

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>