title: How to initialize a dynamic array in java?
body: <p>If I have a class that needs to return an array of strings of variable dimension (and that dimension could only be determined upon running some method of the class), how do I declare the dynamic array in my class' constructor?</p>
  
  <p>If the question wasn't clear enough,</p>
  
  <p>in php we could simply declare an array of strings as <code>$my_string_array = array();</code>
  and add elements to it by <code>$my_string_array[] = "New value";</code></p>
  
  <p>What is the above code equivalent then in java?</p>