Skip to main content

setSet<E> and list bothList<E> are both used to store the elements of type E.But, set The difference is that Set is stored in unordered way butand does not allow duplicate values.list List is used to store elements in ordered way butand it maydoes allow duplicate values.

setSet elements cannot be accessed by an index position, list and List elements can access by usingbe accessed with an index position.

set and list both are used to store the elements.But, set is stored in unordered way but does not allow duplicate values.list is used to store elements in ordered way but it may allow duplicate values

set elements cannot be accessed by index position, list elements can access by using index position.

Set<E> and List<E> are both used to store elements of type E. The difference is that Set is stored in unordered way and does not allow duplicate values. List is used to store elements in ordered way and it does allow duplicate values.

Set elements cannot be accessed by an index position, and List elements can be accessed with an index position.

Source Link

set and list both are used to store the elements.But, set is stored in unordered way but does not allow duplicate values.list is used to store elements in ordered way but it may allow duplicate values

set elements cannot be accessed by index position, list elements can access by using index position.