What is difference between List and Set?

Solution

  • List can contain duplicate values wheras Set can't have duplicate values.
  • Set(except LinkedHashSet) does not ensure the retrieval of data in same order it was inserted whereas List does.

Share this thread

Comments

Comments
comments powered by Disqus

Navigation

Social Media