I'm looking at this code: https://www.geeksforgeeks.org/bridge-in-a-graph/
Iterator<Integer> i = adj[u].iterator();
while (i.hasNext())
{
int v = i.next(); // v is current adjacent of u
...
Why didn't the author just use a for loop? Wouldn't this be the same?
for (int v: adj[u])