What is the groovy way for doing this initialization? -
Hello, what's the way to do this kind of initialization? For (j = 0; j & lt; 20; j ++) (<= 0) for i ; K & lt; 20; k ++) m [i] [j] [k] = 'a'
It can:
(0..9) .each {i - & gt; (0..19) .each {j - & gt; (0..19) .each {k - & gt; I [i] [j] [k] = 'a'}}}
Comments
Post a Comment