JAVA Collections
JAVA Collections Arrays : Arrays are collection of elements which are of same type . Arrays can store both primitive and reference objects. We have to define the size of an array while initialising the array like below. int[] intArray = new int[3]; Where 3 is size of an array, To check the length of an array we can use .length . There is no option to remove an element from an array just we have to point an object to null and we cannot change the size of an array. When we try to add element at index which is greater than the size of an array then JAVA will throw Array IndexOutofBound Exception. So ., The main disadvantages of Array is that it doesn’t contains any methods to do all the operations. And The size of an array will not dynamically change. ...