How do I get an array slice of an ArrayList in Java? Specifically I want to do something like this:
ArrayList
ArrayList inputA = input.sub
This is how I solved it. I forgot that sublist was a direct reference to the elements in the original list, so it makes sense why it wouldn't work.
ArrayList inputA = new ArrayList(input.subList(0, input.size()/2));