Hi KC
I think there is not a unique way to interpret the requirements. My
vision when I did the homework was:
-- "Create your own HashSet object" = make a new HashSet instance, such as:
HashSet myHashSet = new HashSet();
-- I overridden the "toString()" method of "MyOwnClass" in order to
return a more verbose text:
@Override
public String toString(){
return "MyOwnClass: " + this.name + " - " + this.age;
}
With this, the println behaves better.
Hope it helps
mihai
kc a écrit :
Hi,
Not too sure about the homework requirement:
1. Create your own HashSet object: a little confused the word "your
own", does that mean we need to implement our own HashSet class so we
can create our HashSet object?
2. A little confused on display MyOwnClass object, if I just println,
I will get this mycollectionproject.myowncl...@19821f. Is this
correct?
Regards
KC
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en