Biology Forums - Study Force

Science-Related Homework Help Computer Studies Topic started by: lbelcher on May 5, 2020



Title: What is the output of the following code?public class Test { public static void main(String[] args) ...
Post by: lbelcher on May 5, 2020
What is the output of the following code?

public class Test {
public static void main(String[] args) {
int[][] matrix =
{{1, 2, 3, 4, 5},
{4, 5, 6, 4, 7},
{8, 9, 10, 11},
{12, 13, 14, 15}};
for (int i = 0; i < matrix.length; i++)
System.out.print(matrix[i][3] + " ");
}
}


▸ 2 5 9 13

▸ 1 2 3 4

▸ 4 5 6 7

▸ 1 3 8 12

▸ 4 4 11 15


Title: What is the output of the following code?public class Test { public static void main(String[] args) ...
Post by: h00304413 on May 5, 2020
Content hidden