title: Selection of First L Items of ArrayList of size N > L and Insertion to Another ArrayList in Java
body: <p>I have an ArrayList l1 of size N and another l2 of size L &lt; N. I want to put the L first items of l1 to l2. I thought to use the for loop of type for(Object obj : l1) to scan my list of size N and then use l2.add(obj) to add elements on l2, but I am not sure if when I reach the max size of l2 (i.e. L) stops inserting items or continues.</p>
  
  <p>Could somebody suggest me a way to do that? Thanx</p>