title: Can you make alias for another variable in scala?
body: <p>Is it possible to make an alias for item of an array in scala? The code below won't work but something like that.</p>
  
  <pre><code>var str=new ArrayBuffer[String](10)
  def alias = str(1)
  alias="test"
  print(alias)
  </code></pre>
  
  <p>The code below works and basically what I want to do with the code above. But I don't want to type str(ALIAS) everytime I use this variable. I want shorter name</p>
  
  <pre><code>var str=new ArrayBuffer[String](10)
  val ALIAS=1
  str(ALIAS) = "test"
  print(str(ALIAS))
  </code></pre>