Top Posters
Since Sunday
j
3
s
3
j
2
J
2
e
2
n
2
t
2
d
2
b
2
t
2
J
2
b
2
New Topic  
suiren suiren
wrote...
Posts: 496
4 years ago
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
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 71 times
1 Reply
Replies
Answer verified by a subject expert
beunikuelbeunikuel
wrote...
Posts: 398
4 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here

Related Topics

suiren Author
wrote...

4 years ago
Helped a lot
wrote...

Yesterday
This helped my grade so much Perfect
wrote...

2 hours ago
Smart ... Thanks!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  773 People Browsing
Related Images
  
 58
  
 328
  
 326
Your Opinion
Who will win the 2024 president election?
Votes: 119
Closes: November 4

Previous poll results: Who's your favorite biologist?