starting with java chapter 7

Ace your homework & exams now with Quizwiz!

size declarator vs subscript

SD: indicates the number of elements the array has subscript: identifies a specific element in the array.

two-dimensional array

can be thought of having rows and columns can hold multiple sets of data "array of arrays"

array

can hold multiple values of the same data type simultaneously

binary search algorithm

*values in array must be sorted in ascending order* more efficient than the sequential search

ArrayList

class in the java API similar to an array and allows you to store objects unlike an array, an ArrayList object's size is automatically adjusted to accommodate the number of items being stored in it.

subscript

each element is assigned a number. a subscript is used as an index to pinpoint a specific element within an array

array's size declarator

indicated the number of elements, or values, the array can hold

sorting algorithm

scans an array and arranges data into some order

public field array "length"

this field contains the number of elements in the array

an array can be passed as an argument to a method.

to pass an array you pass the value int he variable that references the array

Java does not limit the number of dimensions that an array may have it is possible to create arrays with multiple dimensions, to model data that occurs in multiple sets.

true

Java initializes array elements within 0

true

once an array is created, its size cannot change

true

sequential search algorithm

uses a loop to sequentially step through an array and compares each element with the value being searched for

initialization list

values stored in the array elements in the order they appear in the list

ragged arrays

when the rows of a two-dimensional array have a different number of columns (have different lengths)

search algorithm

method of locating a specific item in a larger collection of data

ArrayList object capacity

number of items it can store without having to increase its size


Related study sets

Abnormal psych Ch. 7: Understanding Mood Disorders

View Set

employment law & intellectual property

View Set