Q105
What will be the output of the given Java code? import java.util.Arrays; public class SortExample public static void main(String[] args) // Our arr contains 8 elements int[] arr = 10,7,9,5,8,4; Arrays.sort(arr); System.out.printf(Arrays.toString(arr));
A.
[4,5,7,8,9,10]
AnswerB.
[10,9,8,7,5,4]
C.
4,5,7,8,9,10
D.
error
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board