What's wrong with nested arrays?

Hello
Tell me, what could be wrong with this constructii?
ArrayList<arraylist<integer>> list = new ArrayList<arraylist<integer>>(10);</arraylist<integer></arraylist<integer>

I read forums saying it's bad...
Thank you
July 2nd 19 at 17:29
1 answer
July 2nd 19 at 17:31
And arrays where?
If You mean that ArrayList is not an array. If the ones inside the ArrayList is another matter.
In addition to "tight" binding to a specific implementation of List using an ArrayList did not see anything bad.
But in principle, in zavisimosti from the case binding to the specific implementation may be best needed.

As for me, so this option is s top.
final List<list<integer>> list = new ArrayList<>(10);</list<integer>
Do not pay attention to the final , it is not fundamental. - barney.Schroeder90 commented on July 2nd 19 at 17:34

Find more questions by tags Java