Lesson 5.1 · College Board Unit 4
Array Basics
An array has a fixed length, and its indices run from 0 through length - 1. New int array elements start at 0.
Code Scholars Tutoring · AP Computer Science A
Fixed-size indexed storage, and the first place two variable names can refer to the same data. Aliasing is what makes array questions harder than they look.
Lesson 5.1 · College Board Unit 4
An array has a fixed length, and its indices run from 0 through length - 1. New int array elements start at 0.
Lesson 5.2 · College Board Unit 4
Use indexed traversal when positions matter or elements must be replaced. An enhanced for loop provides each element value, not an assignable array slot.
Lesson 5.3 · College Board Unit 4
Assignments replace array elements immediately. Copying the reference creates an alias; copy elements into a new array when the original must remain unchanged.
Lesson 5.4 · College Board Unit 4
Linear search checks candidates in order and returns as soon as the contract is satisfied. Use -1 to signal that no index was found.
Work through questions with a tutor and get help with the steps you find difficult.
Get help with this topic