shortcut for for loop in java for charcater arrays

Solutions on MaxInterview for shortcut for for loop in java for charcater arrays by the best coders in the world

showing results for - "shortcut for for loop in java for charcater arrays"
Egon
17 Oct 2017
1class Main {
2 public static void main(String[] args) {
3
4   char[] vowels = {'a', 'e', 'i', 'o', 'u'};
5  
6   // iterating through an array using the for-each loop
7   for (char item: vowels) {
8     System.out.println(item);
9   }
10 }
11}
similar questions