The “Collections” framework in Java came into action with the release of JDK 1.2 and was expanded quite a few times in Java 1.4 and Java 5 and then again in Java 6.
Continue readingarraylist
Choose the Right Java Collection
Java offers you a variety of collection implementations to choose from. In general you will always look for the collection with the best performance for your programming task, which in most cases is ArrayList, HashSet or HashMap. But be aware, if you need some special features like sorting or ordering you may need to go for a special…
Continue readingJava ArrayList Example
Java ArrayList class is a resizable array that implements the List interface. It permits all elements, including null and also implements all optional list operations. Most operations that can be run on ArrayList such as size, isEmpty, get, set, iterator and listIterator are all constant time. However, the add operation’s complexity is O(n) time. Compared to LinkedList, the…
Continue readingDifference Between ArrayList and LinkedList in Java
This article explains the differences between ArrayList and LinkedList and in which case we should prefer the one over the other.
Continue reading