collections 692

  1. When to use LinkedList over ArrayList?
  2. How to efficiently iterate over each entry in a 'Map'?
  3. Initialization of an ArrayList in one line
  4. Sort a Map<Key, Value> by values
  5. Iterating through a Collection, avoiding ConcurrentModificationException when removing in loop
  6. How can I initialise a static Map?
  7. Converting 'ArrayList<String> to 'String[]' in Java
  8. How to directly initialize a HashMap (in a literal way)?
  9. Efficiency of Java “Double Brace Initialization”?
  10. How to make a new List in Java
  11. How to convert a Map to List in Java?
  12. What is the best way to filter a Java Collection?
  13. How to convert an Array to a Set in Java
  14. Difference between <? super T> and <? extends T> in Java
  15. Easiest way to convert a List to a Set in Java
  16. How to initialize HashSet values by construction?
  17. How to convert List<Integer> to int[] in Java?
  18. Ways to iterate over a list in Java
  19. C# Set collection?
  20. How to convert comma-separated String to ArrayList?
  21. How do I remove repeated elements from ArrayList?
  22. Why is there no SortedList in Java?
  23. Why there is no ConcurrentHashSet against ConcurrentHashMap
  24. What are the reasons why Map.get(Object key) is not (fully) generic
  25. Retrieving a List from a in Java 8
  26. Is it better to return null or empty collection?
  27. Linq .Any VS .Exists - What's the difference?
  28. Is there a short contains function for lists?
  29. Get nth character of a string in Swift programming language
  30. HashSet vs. List performance
  31. Easy way to change Iterable into Collection
  32. What is the Simplest Way to Reverse an ArrayList?
  33. Most efficient way to increment a Map value in Java
  34. How can I turn a List of Lists into a List in Java 8?
  35. How to sort an ArrayList?
  36. Java Ordered Map
  37. .NET HashTable Vs Dictionary - Can the Dictionary be as fast?
  38. How to randomize two ArrayLists in the same fashion?
  39. The opposite of Intersect()
  40. Java 8 Distinct by property
  41. How to convert int[] into List<Integer> in Java?
  42. Getting an element from a Set
  43. How to convert Set to Array?
  44. Python: defaultdict of defaultdict?
  45. How to convert a Collection to List?
  46. How to clone ArrayList and also clone its contents?
  47. Why doesn't java.util.Set have get(int index)?

  48. How do I overload the square-bracket operator in C#?
  49. Difference between a Seq and a List in Scala
  50. How to quickly and conveniently create a one element arraylist