Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M Ricardo, Susan D Urban

3rd Edition

1284056945, 9781284056945

More Books

Students also viewed these Databases questions