What is Set? Will go with the mathematical explanation: A set is a collection of well defined and distinct objects. So HashSet, LinkedHashSet, TreeSet will …
ArrayList is an resizable-array implementation of the List interface. This class uses a dynamic array for storing elements, including null value. In line no.9 I …