how to do for each in java

Java
for(int i : alist)
{
  i+=1
}
Source

Also in Java: