Collections

what is the difference between collections and arraylist?Thanks in advance.Message was edited by: kumar@java
[136 byte] By [kumar@javaa] at [2007-11-27 2:27:01]
# 1

(ignore_capitalization ON)

literal answer: Collections is a utility class for doing various things with collections. ArrayList is a class that implements the List interface, giving effectively a dynamic array

inferred answer: the same as the difference between a case of beer, and a beer. ArrayList is a part of the Collections "framework"

georgemca at 2007-7-12 2:37:11 > top of Java-index,Core,Core APIs...
# 2
@OP: note that Collection is not the same as Collections. The first is an interface extended by the java.util.List interface. And the java.util.ArrayList class implements the java.util.List interface again.
prometheuzza at 2007-7-12 2:37:11 > top of Java-index,Core,Core APIs...