Unit 6: Arrays

Cards (15)

  • Array: lists that store many values of the same type
  • Index: Array values are stored at a particular index and we access elements in the array by referencing this index value. Index values in Arrays start a 0.
  • array.length
    Returns the length of the array
  • Traversing an Array: the process to loop through an array and access each of the elements. Caution must be taken to avoid looping beyond the valid index values.
  • Enhanced For Loop: A loop that is an alternate to a for or while loop that accesses each value in an array starting at the first value and proceeding in order.
  • Common Array Algorithms: Algorithms that are often used in computer science to do basic analysis on a list. These often include traversing and selection processing.
  • element
    an item in an array
  • data structure: Java construct for storing a data field (e.g., array)
  • null
    it doesn't reference an object yet
  • initializer list: A means of expressing a set of data that can be assigned to the cells of an array in one statement.
  • new keyword: creates a new member of the same name in the derived class and hides the base class implementation.
  • off by one error: Usually seen with loops, this error shows up as a result that is one less or one greater than the expected value.
  • ArrayIndexOutOfBoundsException: occurs when an attempt is made to access an element past either end of an array.
  • linear search: a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched.
  • for each loop: A looping construct primarily used for iterating when you want to simply view or display items in an array or ArrayList.