Sobes.tech
Junior — Middle

Which of the presented data structures does not implement the Collection interface?

sobes.tech AI

Answer from AI

In Java and Android, the Collection interface implements data structures such as List, Set, and Queue. For example, ArrayList, HashSet, LinkedList implement Collection.

However, Map does not implement the Collection interface because it stores key-value pairs and has its own interface, Map.

Therefore, the data structure that does not implement the Collection interface is Map (for example, HashMap, TreeMap).