Top Posters
Since Sunday
1
New Topic  
anthonydel117 anthonydel117
wrote...
Posts: 449
4 years ago
What is the printout of the following program?

public class Test {
public static void main(String[] args) {
int[][] values = {{3, 4, 5, 1}, {33, 6, 1, 2}};
for (int row = 0; row < values.length; row++) {
System.out.print(m(values[row]) + " ");
}
}

public static int m(int[] list) {
int v = list[0];
for (int i = 1; i < list.length; i++)
if (v < list[i])
v = list[i];
return v;
}
}


▸ 33 5

▸ 5 33

▸ 3 33

▸ 1 1

▸ 5 6
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 69 times
1 Reply
Replies
Answer verified by a subject expert
Jacobian S.Jacobian S.
wrote...
Posts: 388
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

anthonydel117 Author
wrote...

4 years ago
Thank you, thank you, thank you!
wrote...

Yesterday
Correct Slight Smile TY
wrote...

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