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 19 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
Excellent


kthug

  • Member
  • Posts: 332
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

After 5 years of being diagnosed with rheumatoid arthritis, one every three patients will no longer be able to work.

Did you know?

Approximately 15–25% of recognized pregnancies end in miscarriage. However, many miscarriages often occur before a woman even knows she is pregnant.

Did you know?

Computer programs are available that crosscheck a new drug's possible trade name with all other trade names currently available. These programs detect dangerous similarities between names and alert the manufacturer of the drug.

Did you know?

Fatal fungal infections may be able to resist newer antifungal drugs. Globally, fungal infections are often fatal due to the lack of access to multiple antifungals, which may be required to be utilized in combination. Single antifungals may not be enough to stop a fungal infection from causing the death of a patient.

Did you know?

Chronic necrotizing aspergillosis has a slowly progressive process that, unlike invasive aspergillosis, does not spread to other organ systems or the blood vessels. It most often affects middle-aged and elderly individuals, spreading to surrounding tissue in the lungs. The disease often does not respond to conventionally successful treatments, and requires individualized therapies in order to keep it from becoming life-threatening.

For a complete list of videos, visit our video library