title: Java MessageFormat cannot format
body: <p>Here is a string <code>template</code> read from file.</p>
  
  <pre><code>Dialogue: {0}
  Dialogue: {1}
  </code></pre>
  
  <p>After I read it from file, I want to format this string using given array.</p>
  
  <pre><code>var sentences = arrayOf("hello", "world")
  var template = File("file_path").readText()
  
  template = MessageFormat.format(template, sentences)
  
  print(template)
  </code></pre>
  
  <p>But I get output.</p>
  
  <pre><code>Dialogue: [Ljava.lang.String;@27c170f0
  Dialogue: {1}
  </code></pre>
  
  <h1>EDIT</h1>
  
  <p>If I put array elements one by one, I will get right output.</p>