ITM 200 Chapter 9: Chapter 9

63 views3 pages

Document Summary

9. 1 problem: an array of integers is effectively a sequence of integer variables, which you can refer to individually by giving their position in the sequence. Automatic initialization: when an array is created, if it contains, numbers they are initialized to zero, booleans they are initialized to false, references they are initialized to null. Array index: array index type must be integer, array index starts at 0, means that the index of the last element will be the number of elements in the array 1. Accessing an array element: refer to pg 201. Length: length contains the number of components in its associated array, that is the length of an array is the value of the expression. 9. 5 more on array reference variables: example on pg 203-204. Dry running programs containing arrays: dry running is a good way to understand and debug programs containing arrays. Initialize lists: when you create an array of integers, java automatically initialize them to 0.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions