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