Exercises

7.6Fill in the blanks in each of the following statements:
  1. One-dimensional array p contains four elements. The names of those elements are _____, _____, _____ and _____.

  2. Naming an array, stating its type and specifying the number of dimensions in the array is called _____ the array.

  3. In a two-dimensional array, the first index identifies the _____ of an element and the second index identifies the _____ of an element.

  4. An m-by-n array contains _____ rows, _____ columns and _____ elements.

  5. The name of the element in row 3 and column 5 of array d is _____.

7.7Determine whether each of the following is true or false. If false, explain why.
  1. To refer to a particular location or element within an array, we specify the name of the array and the ...

Get Java™ How to Program, Seventh Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.