I\'m trying to make it working for quite some time,but just can\'t seem to get it. I have object Tower built of Block\'s. I\'ve already made it working using arrays, but I w
It's difficult to answer this question with the information given. Nothing looks particularly wrong with how you are using HashSet.
Well, I'll hazard a guess that it's not a compilation issue and, when you say "getting errors," you mean "not getting the behavior [you] want."
I'll also go out on a limb and suggest that maybe your Block's equals an hashCode methods are not properly overridden.