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

Author Question: What is the printout of the following code?public class Test { public static void main(String[] ... (Read 34 times)

kodithompson

  • Hero Member
  • *****
  • Posts: 566

Question 1

What is the printout of the following code?

public class Test {
public static void main(String[] args) {
int[][][] data = {{{1, 2}, {3, 4}},
{{5, 6}, {7, 8}}};
System.out.print(data[1][0][0]);
}
}

◦ 1
◦ 2
◦ 4
◦ 5
◦ 6

Question 2

What is the printout of the following code?

public class Test {
public static void main(String[] args) {
int[][][] data = {{{1, 2}, {3, 4}},
{{5, 6}, {7, 8}}};
System.out.print(ttt(data[0]));
}

public static int ttt(int[][] m) {
int v = m[0][0];

for (int i = 0; i < m.length; i++)
for (int j = 0; j < m[i].length; j++)
if (v < m[i][j])
v = m[i][j];

return v;
}
}

◦ 2
◦ 4
◦ 1
◦ 6
◦ 5


Related Topics

Need homework help now?

Ask unlimited questions for free

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

covalentbond

  • Sr. Member
  • ****
  • Posts: 336
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




kodithompson

  • Member
  • Posts: 566
Reply 2 on: May 6, 2020
Excellent


tanna.moeller

  • Member
  • Posts: 328
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

Cytomegalovirus affects nearly the same amount of newborns every year as Down syndrome.

Did you know?

Side effects from substance abuse include nausea, dehydration, reduced productivitiy, and dependence. Though these effects usually worsen over time, the constant need for the substance often overcomes rational thinking.

Did you know?

Immunoglobulin injections may give short-term protection against, or reduce severity of certain diseases. They help people who have an inherited problem making their own antibodies, or those who are having certain types of cancer treatments.

Did you know?

Before a vaccine is licensed in the USA, the Food and Drug Administration (FDA) reviews it for safety and effectiveness. The CDC then reviews all studies again, as well as the American Academy of Pediatrics and the American Academy of Family Physicians. Every lot of vaccine is tested before administration to the public, and the FDA regularly inspects vaccine manufacturers' facilities.

Did you know?

Anti-aging claims should not ever be believed. There is no supplement, medication, or any other substance that has been proven to slow or stop the aging process.

For a complete list of videos, visit our video library