On Aug 14, 9:37 pm, JKid314159 <[email protected]> wrote:
> Dear Instructor:
>  
> For this homework we are asked to create a HashSet, LinkHashSet and ArrayList 
> object.  I have created the first two.  The way I iterate is I created 
> another method outside of the
> main driving method in the main class.  I used this method called filter to 
> iterate over the list.
>  
> But to do this, I had to cast the HashSet and LinkHashSet to a Collection 
> object.  So, I had to pass a collection object to the filter method.  This 
> has cut the repetitiveness out of my code.
That is what I did. That is also the usefulness of collections.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to