I have a list of String[] that contains some data returned from a database
List<String[]> x;
Now for each "x" I have to store its relative Ys. (Imagine that "x" contains the elements returned from a "SELECT DISTINCT xColumn1, xColumn2 FROM table" and now for each element I have to store the data from another query).
Y's elements are going to be stored here:
List<List<String[]>> yElements;
I've read that I can declare a fixed length list, but I don't know how. This is what I have done:
yElements = Arrays.asList(new List<String[]>[x.sixe()]);
Netbeans told me "generic array creation" error.
I also want to tell you that I MUST have a fixed lenght list to store a List of String[ ] in a specific index of this List of Lists. (If you can show me how to do with an array it would be great, too!) Thanks.