Top "Collections" questions

Collections APIs provide developers with a set of classes and interfaces that make it easier to handle collections of objects.

How do I make my ArrayList Thread-Safe? Another approach to problem in Java?

I have an ArrayList that I want to use to hold RaceCar objects that extend the Thread class as soon …

java multithreading collections synchronization arraylist
Collection was modified; enumeration operation may not execute in ArrayList

I'm trying to remove an item from an ArrayList and I get this Exception: Collection was modified; enumeration operation may …

c# exception collections enumeration
Difference between Dictionary and Hashtable

Possible Duplicate: Why Dictionary is preferred over hashtable in C#? What is the difference between Dictionary and Hashtable. How to …

c# collections
Sorting an ArrayList of objects using a custom sorting order

I am looking to implement a sort feature for my address book application. I want to sort an ArrayList<…

java sorting collections arraylist
Java: How to convert String[] to List or Set

How to convert String[] (Array) to Collection, like ArrayList or HashSet?

java arrays collections converter
Java Immutable Collections

From Java 1.6 Collection Framework documentation: Collections that do not support any modification operations (such as add, remove and clear) are …

java collections immutability
Accessing items in an collections.OrderedDict by index

Lets say I have the following code: import collections d = collections.OrderedDict() d['foo'] = 'python' d['bar'] = 'spam' Is there …

python collections dictionary python-3.x ordereddictionary
How to find an object in an ArrayList by property

How can I find an object, Carnet, in a ArrayList<Carnet> knowing its property codeIsin. List<Carnet&…

java arraylist collections
How can I get a List from some class properties with Java 8 Stream?

I have a List<Person>. I need to get a List from a property of Person. For example, …

java collections java-8 java-stream
Dictionary returning a default value if the key does not exist

I find myself using the current pattern quite often in my code nowadays var dictionary = new Dictionary<type, IList&…

c# collections dictionary