I have an ArrayList l1 of size 10. I assign l1 to new list reference type l2. Will l1 and l2 po
ArrayList
l1
l2
Yes, assignment will just copy the value of l1 (which is a reference) to l2. They will both refer to the same object.
Creating a shallow copy is pretty easy though:
List newList = new ArrayList<>(oldList);
(Just as one example.)