public class Test { public static void main(String[] args) { for (final int i : new int[] { 1, 2, 3 }) { System.out.println(i + 1); } } }
array = new int[] { 1, 2, 3 }; for(int index = 0; index < array.length; index ++) { final int i = array[index]; ... }
Login in to like
Login in to comment
or Read more about Java Quizzes
Login in to like
Login in to comment