What will be the output of the following Java program? [code] import java.util.*; class Array { public static void

What will be the output of the following Java program?
Code:
    import java.util.*;
    class Array
    {
        public static void main(String args[]) 
        {
            int array[] = new int [5];
            for (int i = 5; i > 0; i--)
                array[5 - i] = i;
            Arrays.sort(array);
            for (int i = 0; i < 5; ++i)
            	System.out.print(array[i]);;
        }
    }
A. 12345
B. 54321
C. 1234
D. 5432
 

Tìm kiếm

Back
Top