// ArrayList<int> intgers = new ArrayList<int>(); // <- breaks. You cant // have prmitives in generics ArrayList<Integer> intgers = new ArrayList<Integer>(); // <-works, and it // has the same effect as having integers into it.