Category: Collection Framework

ArrayList in Java

ArrayList in Java

ArrayList: ArrayList is resizable-array implementation of the List interface. It implements all optional list operations, and permits all elements, including null. This class provides methods to manipulate to the size of array that is used...

Initialize the ArrayList in Java

Initialize the ArrayList in Java

Java collection framework was non-generic before JDK 1.5. Since 1.5, it is generic. Java generic collections allows you to have one type of object in collection i.e. you can create collection for String type...