ArrayList in Java || Java and DSA course || Blog 10

W e know what is an A rray. An array is a collection of similar data elements stored at contiguous memory locations. It has a fixed size. If we want to add value to our array whose current size is 7 and elements present are 7, its not possible. Even if we don't have continuous memory, we cannot make an array. These were some drawbacks of Array. ArrayList solves this drawbacks .ArrayList connects to each memory . It is non-continuous. the size of ArrayList is a variable. it change according to us. It can store Primitive Data type and Objects. To know more about Primitive Data types, visit:- https://unnatikadamjavadsa.blogspot.com/2022/06/data-types-in-java-java-dsa-course-blog.html ArrayList is a part of collection framework For a quick overview we will be learning about : add get insert set delete size loops/iterate sorting We need to import package named as java.util.ArrayList To make an ArrayList we use, ArrayList<Integer> list1 = new ArrayList<I...