Question: Which of the following code segments will correctly print all elements of a 2 D int array called arr? I. for ( int i =
Which of the following code segments will correctly print all elements of a D int array called arr?
I. for int i ; i arr.length; i for int j ; j arr.length; j
System.out.printlnarrij;
System.out.println;
II for int x : arr
for int j ; j xlength; j
System.out.printlnxj;
System.out.println;
III. for int i : arr for int j : i
System.out.printlnarrij;
System.out.println;
A I only B II only C III only D I and II E I and III
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
