RiazKhanmohamed
Programmer
- Oct 30, 2002
- 115
Hi, guess i'm still a newbie in this field really.
I've been recently introduced to collections from vb, so thought i'd give them a go in java. Perhaps I got the wrong end of the stick, but is this logic possible:
I have a class called Holiday, storing holiday information from a database.
I add a series of these to a collection (thus far i've tried HashSet, ArrayList and Vector).
I can list the counts, and check if specific holiday objects are in the collection.
But how do i get the holiday classes out of the collection? in vb it's automatically output as the original class. but in java it comes out as an object, cross-convertable to a class but not my class. Maybe i'm looking at the wrong end of the problem, but any guidance would be much appreciated. Thanks in advance
I've been recently introduced to collections from vb, so thought i'd give them a go in java. Perhaps I got the wrong end of the stick, but is this logic possible:
I have a class called Holiday, storing holiday information from a database.
I add a series of these to a collection (thus far i've tried HashSet, ArrayList and Vector).
I can list the counts, and check if specific holiday objects are in the collection.
But how do i get the holiday classes out of the collection? in vb it's automatically output as the original class. but in java it comes out as an object, cross-convertable to a class but not my class. Maybe i'm looking at the wrong end of the problem, but any guidance would be much appreciated. Thanks in advance