title: Scala: Why does Array.ofDim[String](n) create an Array where values are initialized as nulls rather than empty strings?
body: <p>Since Scala advocates avoiding the usage of <code>null</code>, I do not understand why the default values are null in this specific use-case. Can someone please explain this ?</p>
  
  <pre><code>scala&gt; Array.ofDim[String](1)
  res0: Array[String] = Array(null)
  </code></pre>
  
  <p>On the other-hand, defaults for other types seems to be fine.</p>
  
  <pre><code>scala&gt; Array.ofDim[Double](1)
  res1: Array[Double] = Array(0.0)
  
  scala&gt; Array.ofDim[Int](1)
  res2: Array[Int] = Array(0)
  
  scala&gt; Array.ofDim[Boolean](1)
  res3: Array[Boolean] = Array(false)
  
  scala&gt; Array.ofDim[Float](1)
  res4: Array[Float] = Array(0.0)
  </code></pre>
  
  <p>UPDATE/EDIT:
  Not that it is a big deal, I can map over the array and wrapping each element in Option and fold it by providing default value is "". I want to understand why this is the default behavior</p>