I want to achieve the following vector initialisation in C++ using ArrayList in Java. I need to use ArrayList as I might want to change the size later on. I DO NOT want to use arrays.
vector<vector<int>> arr(M,vector<int>(N,X));
I want to do this using ArrayList in Java hopefully in a single line as above.