[java programming] LAB-1016 Java Collections Framework

2011-06-14 Thread Recca
On Homework exercise for Java Collections Framework. The instruction says to "... Add the following objects with properly initialized values to the newly created HashSet object ... 2 String objects ... 3 Integer objects ... " My questions is do I have to declare the String and Integer this way: h

[java programming] LAB-1016 - Java Collections Framework

2009-02-07 Thread Dusty Dew
Okay I am finally stuck! How in the world do you add a user defined object to a Set and display the individual members of that object? I am a C++ programmer at heart, so I want to overload the insertion operator, but there aren't any streams in Java? I'm confused, please help, thanks in advance: