So, I want an array of Vector of Integer in Java.
If I put
Vector<Integer>[] matrix;
matrix = new Vector<Integer>[100];
I get cannot the compilation error
cannot create a generic array of Vector
Should I use
matrix = new Vector[100];
instead? (which gives a warning)
Or should I simply not use an array of vectors and use vector of vector instead?
Note: I don't want a Vector< Integer >, I want a Vector< Integer >[] to create a matrix of Integers without using Integer[][].
Listinstead ofVector. Is there a particular reason you aren't using an array of arrays, or a v̶e̶c̶t̶o̶r̶ ̶o̶f̶ ̶v̶e̶c̶t̶o̶r̶s̶ list of lists?