java slice a list code example Example: slice a list java new ArrayList(input.subList(0, input.size()/2))