What is different on List and Set in Java Collection

Tutorials Shared by the Internet Community

Advertisements


Synopsis

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 - 26918

  • Total Votes - 101 votes

  • Vote Up - 45 votes

  • Vote Down - 56 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. ...


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

Advertisements