Retrieving a certain number of items from a java list for processing
<p>I have a situation where we are passing a List to a method for processing. We need to now make sure that we only pass a list that has 40 items at any given time. In other words, if the list has 100 items, then it should invoke the method by passing the list with 40 items, then 40 again and then the last 20. How can I achieve this behavior? Some examples will be really helpful.</p>
