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