Home / Expert Answers / Computer Science / see-the-program-output-below-and-choose-the-correct-program-that-will-display-the-output-program-o-pa880

(Solved): See the program output below and choose the correct program that will display the output. Program O ...




See the program output below and choose the correct program that will display the output.
Program Output:
Original Array : \(
See the program output below and choose the correct program that will display the output. Program Output: Original Array : \( [52,45,32,64,12,87,78,98,23,7] \) Sorted Array : \( [7,12,23,32,45,52,64,78,87,98] \) A. import java. util. Arrays; public class Question2 \{ public static void main(Stringll args) \{ \( / / \) define an array int [ ] intArray \( = \) new int [9] inArray \( =\{52,45,32,64,12,87,78,98,23,7\} \); System. out. printf("Original Array : \( \$ 5^{\prime \prime} \), Arrays.toString(intArray)); Arrays.sort (intArray); System. out. printf("\n\nSorted Array : \$s", Arrays. toString(intArray)); 3 B. import java. util. Arrays; public class Question_2 \{ public static void main(String[] args) \{ //define an array int [ ] intArray \( =\{52,45,32,64,12,87,78,98,23,7\} \); System. out. printf("Original Array : \( 8 s^{\prime \prime} \), Arrays. toString(intArray)); Arrays.sort (intArray); System.out. print \( f\left(" \backslash n \backslash n S o r t e d\right. \) Array : \( \% 5^{\prime \prime} \), Arrays. toString(intArray)); 3 \}


We have an Answer from Expert

View Expert Answer

Expert Answer


Answer: B Explanation: Correct Program Code: import java.util.Arrays; public class Qu
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe