On Saturday, 25 May 2019 at 16:17:40 UTC, Robert M. Münch wrote:
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.
myRectData[] = null;