What is the difference between List and Set ?

List can have duplicates but set can not have.
List implementations are ordered by index position but Set is not.
If we retrive the elements from list every time we will get the same order but in case of set we might ght different order.

No comments:

Post a Comment