This topic contains a solution. Click here to go to the answer

Author Question: What is the output of the following code?public class Test5 { public static void main(String[] args) ... (Read 21 times)

Pea0909berry

  • Hero Member
  • *****
  • Posts: 573

Question 1

What is the output of the following code?

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

◦ 1 2 3 4
◦ 2 5 9 13
◦ 4 5 6 7
◦ 3 6 10 14
◦ 1 3 8 12

Question 2

What is the output of the following code?

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

◦ 2 5 9 13
◦ 3 6 10 14
◦ 1 3 8 12
◦ 4 5 6 7
◦ 1 2 3 4


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by Pea0909berry on May 6, 2020

mcomstock09

  • Sr. Member
  • ****
  • Posts: 377
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 39% of students answer this correctly




Pea0909berry

  • Member
  • Posts: 573
Reply 2 on: May 6, 2020
Wow, this really help


chereeb

  • Member
  • Posts: 326
Reply 3 on: Yesterday
Great answer, keep it coming :)

 

Did you know?

Malaria mortality rates are falling. Increased malaria prevention and control measures have greatly improved these rates. Since 2000, malaria mortality rates have fallen globally by 60% among all age groups, and by 65% among children under age 5.

Did you know?

Nitroglycerin is used to alleviate various heart-related conditions, and it is also the chief component of dynamite (but mixed in a solid clay base to stabilize it).

Did you know?

About 600,000 particles of skin are shed every hour by each human. If you live to age 70 years, you have shed 105 pounds of dead skin.

Did you know?

Everyone has one nostril that is larger than the other.

Did you know?

Bacteria have been found alive in a lake buried one half mile under ice in Antarctica.

For a complete list of videos, visit our video library