title: How can I create an array that contains latitude and longitude and use for loop to mark the positions on google map in android
body: <p>I've just started coding in android and after a very long time I got my google map to work and have been able to put markers on it.</p>
  
  <p>What I want to do next is create a array of latlng and use for loop to put a marker on the google maps. I cannot figure out how to do. Could someone please help me. I have done the following so far.</p>
  
  <pre><code>ArrayList&lt;Markers&gt; mMap = new ArrayList&lt;Markers&gt;();
  
  public ArrayList arraylist[] = {new ArrayList(
                              new LatLng(30.243442, -1.432320)),
  </code></pre>
  
  <p>I would like to expand this later, hence I would like to use array list.</p>
  
  <p>I understand how the for loop works, but I cannot work out how to implement it with this as I cannot get those locations from array to tag on my map.</p>
  
  <pre><code>      for (i = 0; i &lt; cars.length; i++) {
  mMap.addMarker(new MarkerOptions()
          .position(new LatLng(10, 10))
          .title("Hello world"));
          }
  </code></pre>
  
  <p>I am completely lost from this stage. Could someone please guide and help me out.</p>
  
  <p>Thanks.</p>