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 32 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
YES! Correct, THANKS for helping me on my review


anyusername12131

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

 

Did you know?

There are more sensory neurons in the tongue than in any other part of the body.

Did you know?

Drying your hands with a paper towel will reduce the bacterial count on your hands by 45–60%.

Did you know?

The calories found in one piece of cherry cheesecake could light a 60-watt light bulb for 1.5 hours.

Did you know?

Vaccines prevent between 2.5 and 4 million deaths every year.

Did you know?

The lipid bilayer is made of phospholipids. They are arranged in a double layer because one of their ends is attracted to water while the other is repelled by water.

For a complete list of videos, visit our video library