For-each loop in Java

Java
voted: 0
vote
foreach loop for

Simple example of for-each loop (Enhanced For)

public class Main {
  public static void main(String[] args) {

    int[] tab = {3, 23, 2134, 1234, 1234, 555};

    for (int i: tab) {
      System.out.println(i);
    }

  }
}
working url: not entered
version: not entered
Leave a Comment:
Characters left:
No comments yet.