What is the syntax for making a List of arrays in Java?
I have tried the following:
List<int[]> A = new List<int[]>();
and a lot of other things.
I need to be able to reorder the int arrays, but the elements of the int arrays need not to be changed. If this is not possible, why?
Thank you.
Firstly, you can’t do
new List();it is an interface.To make a list of int Arrays, do something like this :
P.S. As per the comment, package for List is
java.util.Listand for ArrayListjava.util.ArrayList