Computer Science Chp. 7 Test Questions
TRUE
A sorting algorithm is a technique for scanning through an array and rearranging its contents in some specific order.
FALSE
A sorting algorithm is used to locate a specific item in a larger collection of data.
FALSE
Java limits the number of dimensions that an array may have to 15.
TRUE
An ArrayList object automatically expands in size to accommodate the items stored in it.
FALSE
An array can hold multiple values of several different data types simultaneously.
FALSE
If a[] and b[] are two integer arrays, the expression a == b compares the array contents.
TRUE
Java does not limit the number of dimensions that an array may have.
TRUE
Objects in an array are accessed with subscripts, just like any other data type in an array.
TRUE
Once an array is created, its size cannot be changed.
TRUE
The String[] args parameter in the main method header allows the program to receive arguments from the operating system command-line.
TRUE
To compare the contents of two arrays, you must compare the elements of the two arrays.
TRUE
Any items typed on the command-line, separated by space, after the name of the class are considered to be one or more arguments that are to be passed into the main method.
TRUE
When an array of objects is declared, but not initialized, the array values are set to null.
TRUE
Declaring an array reference variable does not create an array.