title: How to loop data inside array URL from sqlite?
body: <p>I want to create app to download image from API. The URL is dynamic, from sqlite</p>
  
  <p>this is my code:</p>
  
  <pre><code>private URL[] URLS;
  ArrayList&lt;String&gt; urlList = new ArrayList&lt;String&gt;();
  String imagesName;
  .........
  .........
  .........
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  
  
  // Database
  dataBase = new DataBaseHelper(this);
  try {
      cursor = dataBase.getImageFiles();
      while (cursor.moveToNext()) {
      imagesName = cursor.getString(cursor.getColumnIndex("path"));
      urlList.add(imagesName);
  }
  }finally {
      cursor.close();
  }
  </code></pre>
  
  <p>I want to loop data to this code, but I got error <code>; expected</code></p>
  
  <pre><code>URLS = new URL[]{
      // is it possible to loop data here other way ?
      // I want to loop data from sqlite here
      // but I got error
  
      for (int i = 0; i &lt; urlList.size(); i++) {
          stringToURL(urlList.get(i)));
          }
      }
  }
  </code></pre>
  
  <p>is it possible to do that ? or any other way to loop data inside array?
  Thank you..</p>