andrepedroso
10-24-2005, 03:55 PM
Hello,
Sorry! I'm baziliam and I know English a little.
So...
I need the information about Java Colections (I don't know to write rigth :confused: ).
In site of Brazil is very dificult to have information about this things.
Tanks so much!
and Sorry because my English.
BigDog
10-24-2005, 04:04 PM
in Java, Collections is actually an interface. An interface cannot be used to instantiate an object, it can only be used by other classes looking to implement the methods described in the interface. So you never create a collection directly, although you can upcast something that implements the collection interface to a collection type. The collection interface doc is found at http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html.
What you are probably looking for are the "All Known Implementing Classes" listed in the above link. Each of these behave differently and are used for different situations, yet all of these implement the methods described in the collection interface. Of all the listed items, the most commonly used would be HashSet http://java.sun.com/j2se/1.4.2/docs/api/java/util/HashSet.html, LinkedList http://java.sun.com/j2se/1.4.2/docs/api/java/util/LinkedList.html and Vector http://java.sun.com/j2se/1.4.2/docs/api/java/util/Vector.html.
These listed docs are all for the 1.4.2 version of Java. Other versions will differ.