Question
How do I solve this error in the code? Code: import java.util.Scanner; public class CourseGradePrinter { public static void main (String [] args) { final
How do I solve this error in the code?
Code:
import java.util.Scanner;
public class CourseGradePrinter { public static void main (String [] args) { final int NUM_VALS = 4; int[] courseGrades = new int[NUM_VALS]; int i;
courseGrades[0] = 7; courseGrades[1] = 9; courseGrades[2] = 11; courseGrades[3] = 10;
for(i=0;i { System.out.print(courseGrades[i]+" "); } System.out.println(); for(i=courseGrades.length-1;i>=0;i--) { System.out.print(courseGrades[i]+" "); } } } Error:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started