title: Create an Array populating it by .txt elements
body: <p>I want to create an array, populating it while reading elements from a .txt file formatted like so:</p>
  
  <pre><code>item1
  item2
  item3
  </code></pre>
  
  <p>So the final result has to be an array like this:</p>
  
  <pre><code>String[] myArray = {item1, item2, item3}
  </code></pre>
  
  <p>Thanks in advance.</p>