Top Posters
Since Sunday
k
3
r
3
j
3
V
3
l
3
2
J
2
1
2
n
2
O
2
h
2
d
2
New Topic  
mrive3127 mrive3127
wrote...
Posts: 509
Rep: 8 0
4 years ago
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
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


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

Related Topics

mrive3127 Author
wrote...

4 years ago
Thanks for your help!!
wrote...

Yesterday
Smart ... Thanks!
wrote...

2 hours ago
Good timing, thanks!
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  930 People Browsing
Related Images
  
 363
  
 212
  
 73