You forgot to add that ArrayLists cannot work with primitive types.