title: Find the index value of a character stored in arraylist
body: <p>I have a string <code>arraylist</code>. Need to get the index values of all elements if its value equals a specific character.</p>
  
  <p>For eg need to get the index value of element if its value = "."</p>
  
  <p>with <code>indexOf()</code> &amp; <code>lastIndexOf()</code> i am able to find only the index value of 1st and last occurrence respectively.</p>
  
  <pre><code>ArrayList&lt;String&gt; als_data = new ArrayList&lt;String&gt;();
  
  als_data[0] = "a"
  als_data[1] = "b"
  als_data[2] = "a"
  als_data[3] = "c"
  als_data[4] = "d"
  als_data[5] = "a"
  </code></pre>
  
  <p>now i need to find the indices of <code>"a"</code></p>
  
  <p>my output should be like</p>
  
  <pre><code>0
  2
  5
  </code></pre>
  
  <p>please help me out in doing this.</p>