The addAll(Collection c) method of java.util.ArrayList class will simply inserts all of the elements in the specified collection to the end of this list. [Read more…]
This is one of the popular question in the java world. I have encountered this situation a lot of times in my life which made me to write up this article on converting a Java Array to ArrayList. Almost everybody knows that the Arrays are used to store primitive datatypes and ArrayList is used to store the Objects. Lets see the different ways to convert.