Java Collections
ArrayList Vs HashSet: Load Factor: The default load factor of an ArrayList is 0.75f. For example, the current capacity is 10. So, loadfactor = 10*0.75=7 while adding the 7th element array size will increase. Growth Rate: current_size + current_size/2 Example: package com.vasanth.java.collections; import java.util.ArrayList; import java.util.HashSet; /** * * @author Vasanth * */ public class ArrayListVsHashSet { public static void main (String args[]) { /* ArrayList * - Implements List Interface * - Baked by Array * - Insertion order will be maintained * - Duplicates are allowed * - Null allowed , no restriction. * - Index based. we can retrieve/remove object using index. get(index)/remove(index) */ ArrayList<Object> arrayList = new ArrayList<>(); System.out.println("===== ArrayList====="); arrayList.add("hello"); arrayList.add(20d); arrayList.add(1); arrayList.add(10L)...