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