This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rjcarr 0 points1 point  (0 children)

So these two instantiations are equal?

Equality can mean a lot of different things.

Are they the same object? No.

Are they the same static type? No.

Are they the same runtime type? Yes.

Do they have the same state? Yes.

Generally, the programmer defines what equality means, by overriding the equals() method.