In generics, such as List, they're still stored on the heap. The difference is that, internally, a List makes a single array of integers, and can store the numbers directly. WIth ArrayList, you end up storing an array of references to boxed integer values.