What is different on List and Set in Java Collection

Tutorials Shared by the Internet Community

Advertisements


What is different on List and Set in Java Collection

Main difference between Set and List is that Set does not allow any duplicates and only store unique objects while List allow duplicates. Another diff

Statistics

  • Total Hits - 32488

  • Total Votes - 105 votes

  • Vote Up - 46 votes

  • Vote Down - 59 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Collections

  • Submitted By - Javin Paul

  • Submitted on - 2012-08-25 08:30:25

Description

Main difference between Set and List is that Set does not allow any duplicates and only store unique objects while List allow duplicates. Another difference between Set and List is that Set does not maintain any order while List maintains order on which object is added into List.    More detail...


Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements