Construct an element with initial values.
In [1]:
Array(1, 2, 3)
Out[1]:
In [2]:
new Array[String](3)
Out[2]:
Construct an array of given size with all zeros.
In [3]:
Array.fill(3){0}
Out[3]:
In [4]:
new Array[Int](3)
Out[4]: