Question: How can I fix this? Please any help would be greatly appreciated public 1 . Using a for loop, fill the array a with 0

How can I fix this? Please any help would be greatly appreciated public 1. Using a for loop, fill the array a with 0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2. Complete the code below. Fill.java 1 import java.util.Arrays; 23 public class Fill 4{5 public static void main(String[] args)67 int[] a = new int[18]; 8 for (int i=0; int j=0; i < a.length; i++){10 a[i]= j++; 11 if (j==3)12{13 j=0; 14}15}16 System.out.println(Arrays.toString(a)); 17}18} x 9 CodeCheck Reset Testing Fill.java Error: Fill.java:8: error: '.class' expected for (int i=0; int j=0; i < a. length; i++) Fill.java:8: error: ')' expected for (int i=0; int j=0; i < a.length; i++) Fill.java:8: error: > expected for (int i=0; int j=0; i < a.length; i++) Fill.java:8: error: not a statement for (int i=0; int j=0; i < a.length; i++) Fill.java:8: error: ';' expected for (int i=0; int j=0; i < a.length; i++)

Step by Step Solution

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 Databases Questions!