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