One Point about For Each Loop I Ridiculously Forgot
|Laughing at me! ;)|
It is not just for an ArrayList but for any iterator.ArrayList<String> as=new ArrayList<String>();
In fact, for each loop is designed for this. But I forgot that. I apologize for the readers that I had missed that most-important point in that post. I thought of updating it, but I need to show off my mistake, so did I write this post. Also take a look at what oracle has written about for-each loop.
Photo credit: Wikimedia