Arrays
True
All elements of an arry are of the same type
methods
Array Lists have
True
Array subscripts must be integers
Primitive Types
ArrayLists CANNOT contain
False
Arrays cannot contain string references as elements
True
Arrays cannot use string as subscripts
False
A method cannot return a two-dimensional array
Automatic
Conversions between the primitive versions of a type and wrapper objects of a type are
True
Elements in an array list can have different types
False
Elements of different columns in two-dimensional array can have different types
initialization
In a for each loop what is nor required?
False
Two-dimensional arrays always have the same number of rows as columns
False
Two-parallel arrays can be replaced by a two dimensional array
Array Lists
a dynamic structure that can grow or shrink
True
a method can change the length of an array list that is passed as a parameter
False
a method can change the length of an array parameter
Array
a sequence of values of the same type that is a one-dimensional data structure
Test suite
a set of tests for repeated testing
True
parallel arrays must have equal lenghth
False
an arraylist can hold values of any type
Index
an integer which designates the position of the array
Benefits of Arrays
efficient uses very little memory in the computer
Wrapper Classes
extend the primitive types by wrapping them in a class with a similar name and providing methods on that class
Regression testing
involves repeating previously run test to ensure that known falures of prior versions do not appear in new versions of the software
Length
is a built in "instance field on an array" age.length()
Two-Dimensional Arrays
known as grid, table, spreadsheet
How Are Rays Constructed
like objects; the new operators constructs an array
Traverse the Array
move through the elements of an Array or ArrayList to perform a specific task
Values are initialized too
number types-0 booleans-false objects- null
Bounds Error
occurs when an array or array list is accesed at an index that is outside the bounds
Auto-Boxing
the name given to the process whereby a primitive type is automatically promoted to an object of the wrapper type
Auto-unboxing
the name given whereby a wrapper object is automatically cast down(demoted) to an object of a primitive type
For each loops
the prefered way to iterate through an array list
contents
the value contained in the element
Disadvantages of Arrays
they are a fixed length; meaning the size cannot be increased or decreased
Is An Array list a generic type
yes
