1.

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

A. 1245
B. 12345
C. 123
D. 123450
E. 1234567
Answer» F.


Discussion

No Comment Found

Related MCQs