To access the number of rows in a two-dimensional array named grades, we use _________________
A) grades
B) grades[i].length
C) grades.size
D) grades.length()
E) grades.length
the correct answer: B) grades[i].length
Example:
public class test {
public static void main (String ... args) {
& int[][] arr = new int[3][7];
& System.out.print(arr[1].length);
}
}
Result = 7;
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF