title: For Loop to populate Array?
body: <p>In the ImageAdapter class of this tutorial, <a href="http://developer.android.com/resources/tutorials/views/hello-gridview.html" rel="nofollow noreferrer">http://developer.android.com/resources/tutorials/views/hello-gridview.html</a></p>
  
  <p>I would like to create and populate an array using a for loop. But it seems no matter where I place it, it causes an error.</p>
  
  <p>For example, under <code>private Context mContext;</code> I put in the following and it causes an error. I think the loop is good, I'm just not sure where I can put it.<br></p>
  
  <p><code>private String[] myString;
  for (int number = 0; number &lt;= 12; number++) {
      myString[number] = "image" + number;
  }</code></p>