Collection is an interface - is a framework which allows for using and manipulating collections.
Set- A collection that cannot contain duplicate elements.
2. Elements are in unordered manner.
List- A collection that can contain duplicate elements.
Elements are in ordered manner.
Read more about List here
Map and HashMap
Map is a n interface and Hash Map is class that implements it.
Iterator:1. Used to iterate over collections.
2. Move only in forward direction.
List Iterator : Used to iterate over List Collection specifically.
2. can traverse in both forward and backward direction.
Set- A collection that cannot contain duplicate elements.
2. Elements are in unordered manner.
List- A collection that can contain duplicate elements.
Elements are in ordered manner.
Read more about List here
Map and HashMap
Map is a n interface and Hash Map is class that implements it.
Iterator:1. Used to iterate over collections.
2. Move only in forward direction.
List Iterator : Used to iterate over List Collection specifically.
2. can traverse in both forward and backward direction.
No comments:
Post a Comment