Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję+ 1
When do we use Sets or Lists in Java?
sets or Lists java
1 Odpowiedź
+ 4
List can contain duplicate elements and Set can not. Also Set elements cannot be accessed by index. So your choice here depends of your task.