On 2019-05-25 14:28:24 +0000, Robert M. Münch said:
How can I reset a rectangualr array without having to loop through it?
int[][] myRectData = new int[][](10,10);
myRectData.length = 0;
myRectData[].length = 0;
myRectData[][].length = 0;
They all give: slice expression .. is not a modifiable lvalue.
My question was unprecise: I want to keep the first dimension and only
reset the arrays of the 2nd dimension. So that I can append stuff again.
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster