0%
0 / 15 answered

Array Creation and Access Practice Test

15 Questions
Question
1 / 15
Q1

A weather station stores rainfall amounts in an array. Given the code snippet,


public class Rain {

  public static void main(String[] args) {

    double[] rain = new double<u>3</u>; // 3 days

    rain<u>0</u> = 0.2;

    rain<u>1</u> = 1.0;

    rain<u>2</u> = 0.0;

  }

}

The array stores decimal values. What data type does the array rain store?

Question Navigator