How to Split a List in Apex without using a For Loop
The List class in APEX does not have a native method to split a list, such as a java subList or Javascript slice. The brute force way would be to loop through the list and either remove the records that are not wanted or create a new list and add the values to the list. […]