1.

What is the output of this program?import java.util.*; public class ArrayExample { public static void main(String args[]) { int arr[] = new int [5]; for (int k = 5; k > 0; k--) arr[5 - k] = k; Arrays.sort(arr); for (int k = 0; k < 5; ++k) System.out.print(arr[k]);; } }

A. 12345
B. 54321
C. 21345
D. 1345
E. 1234
Answer» B. 54321


Discussion

No Comment Found

Related MCQs