Question: What is the output of this program? (a) 12885 (b) 12845 (c) 58881 (d) 54881 import java.util. *; class Array { public static void main(String

What is the output of this program?import java.util. *; class Array { public static void main (String args []) { int array[] = new int [5]; for

(a) 12885

(b) 12845

(c) 58881

(d) 54881

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]);

Step by Step Solution

3.45 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Advanced Java Programming Questions!