title: Shouldn't square braces followed by curly braces cause an error for array initialization?
body: <p>This question is from the context of using the Spring 3 framework with a GWT front end as generated by the Spring Scaffolding process.</p>
  
  <h1>Question 1</h1>
  
  <p>There are two questions I have for the block below. One iis the 'new String[] { key };' part. How is it okay to have the square brackets with curly braces directly after them?
  Shouldn't square braces followed by curly braces cause an error for array initialization?</p>
  
  <h1>Question 2</h1>
  
  <p>Also, it says that this method returns the Primary Key fields in the order they are required by the DAO layer, but it looks like this method could return a maximum of one key with the Object[] and the keyValuesAsText[]. Since the input is only a String how could that possibly be expanded to return an array of keys for DAO objects?</p>
  
  <p>Since this is my first question on stackoverflow any suggestions would be appreciated as to the quality of the question and the way I asked the question.</p>
  
  <h2>code</h2>
  
  <pre><code>/**
    * Returns the Primary Key field values in the order they are required by the DAO     
     layer to find by primary key
    * @param key
    * @return
    */
  protected Object[] getPrimaryKeysFromGoogleKey(String key) {
      String[] keyValuesAsText = new String[] { key };
  
      Object[] keyValues = new Object[keyValuesAsText.length];
      keyValues[0] = new Integer(keyValuesAsText[0]);
  
      return keyValues;
  }
  </code></pre>