title: Create an array of objects in scala
body: <p>I have been trying to figure out on how to create an Array of Objects like we have the below in Java.</p>
  
  <p>Bubble[] bubble = new Bubble[2];</p>
  
  <p>I have defined a class as below:</p>
  
  <pre><code>class  TestUser {
      var username = ""
      var password= ""
      var List = ArrayBuffer.empty[String]
      var DBFile = ""
   }
  </code></pre>
  
  <p>I have to create an array of objects of the above class.</p>
  
  <p>Like in Java -->  <a href="https://stackoverflow.com/questions/5889034/how-to-initialize-an-array-of-objects-in-java">How to initialize an array of objects in Java</a></p>
  
  <p>Can anyone please help me out? </p>