1. Declare and instantiate array variables for the following data:– double[] abc = new double[15] string[] abcd = new string[20] 2. What is an initializer list? – It is another way to initialize the array, it assign the exact values to the array’s element. 3. Use an initializer list to create the following arrays:a. five test scores of 100, 90, 75, 60, and 88. int [] aaa = {100, 90, 75, 60, 88}b. three interest rates of 0.12, 0.05, and 0.15 double[] bbb = {0.12, 0.05, 0.15}c. two strings, your first name and last name string[] ccc = {david, chen} 4. Why is it better to use the form <type> [] <variable> instead of <type> <variable>[] when declaring an array variable. – It’s more confusing.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jan | ||||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | ||