Hi there, I am just curious if I got the right answer for the following code fragment:
int[][] p = {{8,3},{4,3},{7,2}};
String s = "";
for (int i = 0; i < p.length; i++{
Arrays.sort(p[i]);
for (int j = 0; j < p[i].length; j++) {
s += p[i][j];
}
}
System.out.println(s);
My answer "38342"
Thank-you!
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
I ran that code myself and came up with a different answer. Mine was : 383427