title: Set array to variable in groovy
body: <p>New to groovy and not a java lover.  In my <a href="https://jenkins.io/doc/book/pipeline/jenkinsfile/" rel="nofollow noreferrer">jenkinsfile</a>, I'm having an issue with doing what I think would be simple. </p>
  
  <pre><code>SURL = new String[3]
  for (int i = 0; i &lt; 3; i++)
  { 
     url="value"
     SURL[i]="${url}"
  }
  </code></pre>
  
  <p>Seems like in this simple example that SURL[0] through SURL[2] would be set to "value". I'm getting the error:  </p>
  
  <pre><code>java.lang.ArrayStoreException: org.codehaus.groovy.runtime.GStringImpl
  </code></pre>
  
  <p>Any help is appreciated.  Thx! </p>