Solved

Which Set of Statements Totals the Values in Two-Dimensional Int

Question 22

Multiple Choice

Which set of statements totals the values in two-dimensional int array items?


A) int total = 0;
For (int subItems : items) {
For (int item : subItems) {
Total += item;
}
}
B) int total = 0;
For (int item: int[] subItems : items) {
Total += item;
}
C) int total = 0;
For (int[] subItems : items) {
For (int item : items) {
Total += item;
}
}
D) int total = 0;
For (int[] subItems : items) {
For (int item : subItems) {
Total += item;
}
}

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions