In java what is a difference between List Vs. ArrayList? In other words, have you ever wondered what is the difference between Arrays.asList(array) and ArrayList<Integer>(Arrays.asList(array))? This one is a simple Java program which demonstrates the difference between both, i.e. List Vs. ArrayList.
Let’s take a look at both statements first:
crunchifyList1 = new ArrayList<Integer>(Arrays.asList(crunchifyArray));
Here crunchifyList1 is of type ArrayList.. Very simple.