title: Java array initialization within argument list
body: <p>How come the first call to someMethod doesn't compile without being explicit that it's String[]?  </p>
  
  <p>It's fine to use an array initializer to create a String[] array but you can't use it to pass an argument.  Are the curly braces used in some other fashion for passing arguments that derails how I'd expect this to behave?</p>
  
  <pre><code>public void someMethod(String[] arr){
      //do some magic
  }
  
  public void makeSomeMagic(){
  
      String[] arr = {"cat", "fish", "cow"};
  
      //Does not compile!
      someMethod({"cat", "fish", "cow"});
  
      //This compiles!
      someMethod(new String[]{"cat", "fish", "cow"});
  
      //This compiles!
      someMethod(arr);
  }
  </code></pre>
  
  <p>The compiler error is the following:</p>
  
  <p>The method someMethod(String[]) in the type Moo is not applicable for the arguments (String, String, String)</p>