Categories
Why can't the Set interface work like a List?
Why can't I get the elements of a Set without an iterator? (Well, for example, in a List, I can call the get(index) method) What is the main difference?
Answer the question
In order to leave comments, you need to log in
Because set is a non-indexed collection. It has no first or third element. It has just a bunch of elements, the sequence of which is not important.
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question