Does it make sense in an unordered collection to have a method removeFirst(Object target)? Explain.
What will be an ideal response?
Note that the question implies that the collection allows duplicates. If the collection is unordered, you can’t be certain which of the duplicates will be removed. removeSingle(Object target) might be a better name.
Computer Science & Information Technology