title: Anonymous arrays in BeanShell
body: <p>Is there a syntax for declaring anonymous arrays in BeanShell?  I would like to write code analogous to the following:</p>
  
  <pre><code>print(Arrays.asList("cat", "dog"))
  </code></pre>
  
  <p>but BeanShell fails to find the "asList" method, presumably because it doesn't understand varargs.</p>
  
  <p>As a workaround, I could write:</p>
  
  <pre><code>print(Arrays.asList(new Object[]{"cat", "dog"}))
  </code></pre>
  
  <p>but that seems excessively verbose.</p>
  
  <p>Is there a compact BeanShell syntax for anonymous arrays, e.g.:</p>
  
  <pre><code>print(Arrays.asList(["cat", "dog"]))
  </code></pre>
  
  <p>Is there a better way to go about solving this problem altogether?</p>