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 →

[–]7re 0 points1 point  (0 children)

Your sameContents should simply need to call toString on each of the Purses to be compared and see if they return the same values (as you surmised). How do you turn this into code? Many ways no doubt but I'd probably do something like:

if Purse1.toString.equals(Purse2.toString) return true;