Question: Consider the following array and loop: int[] arr = {1,2.3.4.5.6.7): for (int i=0; i < arr.length; i+= 2) { System.out.print(arr[i] + ); }
Consider the following array and loop: int[] arr = {1,2.3.4.5.6.7): for (int i=0; i < arr.length; i+= 2) { System.out.print(arr[i] + " "); } What is the output?
Step by Step Solution
3.38 Rating (148 Votes )
There are 3 Steps involved in it
The given code is a Java code snippet that initializes an array of integers and then iterates throug... View full answer
Get step-by-step solutions from verified subject matter experts
