ExamVeda
Login
Home
Collections Framework in java
?

What will be the output of the following Java program?
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.fill(array, 1, 4, 8);
        for (int i = 0; i < 5 ; i++)
            System.out.print(array[i]);
    }
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.