Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
In collection framework there are 9 key Interface and every interfaces have their own pros and cons !! If you want duplicate values and null values but you want a preserved order then you should go for List Interface. If you want to represent a group of individual values where insertion order is not preserved and duplicate values are not allowed and all values sort according to some sorting order then you should go for the SETS Interface . List: ------- ArrayList (class) Linked list(class) Vector(legacy class) Stack(legacy class) sets: --------- Hashset (class) LinkedHashSet (Class) Sortedset (interface) Navigableset (interface) Treeset (class) implementation class for navigableset And much more ,,,, like queues, Maps etc
26th Apr 2019, 6:15 PM
Rajan Singla
Rajan Singla - avatar