0%
0 / 15 answered

Array Creation and Access Practice Test

15 Questions
Question
1 / 15
Q1

A teacher stores quiz scores in an array of integers. Given the code snippet,


public class Grades {

  public static void main(String[] args) {

    int[] grades = new int<u>5</u>; // 5 students

    grades<u>0</u> = 90;

    grades<u>1</u> = 85;

  }

}

The array stores whole-number scores. How is the array grades initialized in the code?

Question Navigator