Difference between List and Set? which one to prefer in which requirements and why ?
AnswerBot
1y
List allows duplicates and maintains insertion order, Set doesn't allow duplicates and doesn't maintain order.
Use List when duplicates are allowed and order is important
Use Set when duplicates are not...read more
Help your peers!
Add answer anonymously...
Top Cognizant Java Developer interview questions & answers
Popular interview questions of Java Developer
Top HR questions asked in Cognizant Java Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app