title: Declare and Put String array in HashMap in one step
body: <p>I am trying to insert static data into a <strong>HashMap</strong> in Java like this:</p>
  
  <pre><code>HashMap&lt;String,String[]&gt; instruments = new HashMap&lt;String, String[]&gt;();
  instruments.put("EURUSD", {"4001","EURUSD","10000","0.00001","0.1","USD"});
  </code></pre>
  
  <p>But the compiler doesn't like it.  The only way I found to insert that data into the HashMap is to declare the string array separately and then put it into the HashMap, like this</p>
  
  <pre><code>String[] instruDetails = {"4001","EURUSD","10000","0.00001","0.1","USD"};
  instruments.put("EURUSD", instruDetails);
  </code></pre>
  
  <p>But it not very expressive, and hard to maintain</p>
  
  <p>So my question is, is there a way to do the <code>put()</code> operation and string array declaration in one step/line?</p>