Answer is E.
To test:
public static void main(String[] args) {
int [][] arr = new int [2] [4];
arr[0] = new int [] {1, 3, 5, 7};
arr[1] = new int [] {1, 3};
for(int[] a: arr) {
for(int i : a) {
System.out.println(i+ " ");
}
System.out.println();
}
}
Correct, because the "int [2] [4]" It says it's a 2-row, 4-column matrix.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
DarGrin
3 months, 1 week agoSreeni_A
5 months agodsms
5 months agoKolodets
8 months, 3 weeks agoVicky_65
9 months, 2 weeks agocarloswork
1 year, 2 months agoiSnover
1 year, 3 months ago