. "An ArrayList can hold only objects not primitives such as ints, and since int != Integer you can not do what you are trying to do with an array of primitives, simple as that." . . .