new ArrayList() failing in Java

Generics in Java are not applicable to primitive types as in int. You should probably use wrapper types such as Integer:

List<Integer> ints = ...

And, to access a List, you need to use ints.get(index).

Leave a Comment