Collections APIs provide developers with a set of classes and interfaces that make it easier to handle collections of objects.
I'd like to know if I can get the first element of a list or set. Which method to use?
java list collections setI have a class named Fruit. I am creating a list of this class and adding each fruit in the …
java sorting collections arraylistHow can I loop through a List and grab each item? I want the output to look like this: Console.…
c# for-loop collectionsI have a HashMap with various keys and values, how can I get one value out? I have a key …
java collections hashmapWhat is the easiest way to convert a List to a Set in Java?
java collectionsI am using TreeBidiMap from the Apache Collections library. I want to sort this on the values which are doubles. …
java list sorting collections apache-commons-collectionThis is similar to this question: How to convert int[] to Integer[] in Java? I'm new to Java. How can …
java arrays collectionsIn Java there are the SortedSet and SortedMap interfaces. Both belong to the Java Collections framework and provide a sorted …
java sorting collectionsWhat is the best way to convert a JSON code as this: { "data" : { "field1" : "value1", "field2" : "value2" } } in a Java …
java json parsing collectionsWe all know you can't do the following because of ConcurrentModificationException: for (Object i : l) { if (condition(i)) { l.remove(…
java collections iteration