enhacned for loop java

Solutions on MaxInterview for enhacned for loop java by the best coders in the world

showing results for - "enhacned for loop java"
Malo
08 Apr 2020
1// print array elements 
2
3class Main {
4  public static void main(String[] args) {
5      
6    // create an array
7    int[] numbers = {3, 9, 5, -5};
8    
9    // for each loop 
10    for (int number: numbers) {
11      System.out.println(number);
12    }
13  }
14}
similar questions
queries leading to this page
enhacned for loop java