SJSU/Udacity CS046

Problem Set 7

  1. Arrays 1
  2. Arrays 2
  3. Arrays 3
  4. Array Algorithms
  5. Reverse Array
  6. Count Matches
  7. Fill Array
  8. Array Methods
  9. Temperature 1
  10. Temperature 2

Arrays 1

int[] scores = _______________;
Write the code to declare an array of doubles named prices. Use the array syntax from the videos. Do not initialize the variable. double[] prices;
Complete the statement to create an array of ints called scores that can hold 50 ints. new int[50]
Given this statement
double temperatures = new double[12];
what is the length of the array, that is how many elements can it hold?
12
Given this statement
double temperatures = new double[12];
what is the initial value of the element at index 5?
0
Given this statement
double temperatures = new double[12];
complete this code to print the element at index 9.
System.out.println( ______________ );
temperatures[9]

Problem on this page?

Your name:

Your email address:

Problem description:

To protect against spam robots, please answer this simple math problem:
× =