According to Java tutorial by Oracle:
The type parameter section, delimited by angle brackets (<>), follows the class name. It specifies the type parameters (also called type variables) T1, T2, ..., and Tn.
…
A type variable can be any non-primitive type you specify: any class type, any interface type, any array type, or even another type variable.
Generic types used in Java class does not accept primitives, therefore, you should use Integer instead of int; Boolean instead of boolean; Double instead of double. Although, an array in Java is an object and an array of primitives is also accepted.
ArrayList<Double[]> arr = new ArrayList<>();
arr.add(new Double[] {5., 0., 2.);