Core concept

for (var e : list) {
  System.out.println(e);
}
Advertisement

How it works

No index access. Use classic for for that.

Advertisement

Trade-offs + gotchas

Simple iteration.