Scala array initialization

Posted by etam on Stack Overflow See other posts from Stack Overflow or by etam
Published on 2010-04-10T18:38:15Z Indexed on 2010/04/10 18:43 UTC
Read the original article Hit count: 315

Filed under:
|
|
|

You have:

val array = new Array[Array[Cell]](height, width)

How do you initialize all elements to new Cell("something")?

Thanks, Etam (new to Scala).

© Stack Overflow or respective owner

Related posts about scala

Related posts about arrays