In python, when you select a sublist
a = [1,2,3]
sub_a = a[2:10]
It will not blow up but return [3].
In Java, it turns out to be quite different
List<Integer> a = Arrays.asList(1,2,3);
a.subList(2, 10);
An IndexOutOfBoundsException will be thrown.
I am not going to judge the different approaches, but I want to know can Java achieve the same list slicing operation in Python's way?
ArrayListin Java, not actual true arrays. And then it is just about the slicing vssubList.