== is a shallow comparison, like shallow copy, true only if the refrences are identical, not the objects. http://adripofjavascript.com/blog/drips/object-equality-in-javascript.html JAVA and C++ also have this sort of limitation unless you overload the == operator or use a method, like compareTo, equals, and JAVAScript isEqual. JAVA Sets use object.equals(), which is furstrating as you cannot override with your own class.equals().
JamesCherrill commented: About as wrong as a post can be -3
Reverend Jim commented: On Daniweb we strive to help. Doing someone's homework for them is not helping. -3