Quiz
Chapter 7: Starting Out With Java Review Questions
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (23)
11. In an array declaration, this indicates the number of elements that the array will have
- Asubscript
- Bsize declarator
- Celement sum
- Dreference variable
22. Each element of an array is accessed by a number known as a(n)
- Asubscript
- Bsize declarator
- Caddress
- Dspecifier
33. The first subscript in an array is always
- A1
- B0
- C-1
- D1 less than the number of elements
44. The last subscript in an array is always
- A100
- B0
- C-1
- D1 less than the number of elements
55. Array bounds checking happens
- Awhen the program is compiled
- Bwhen the program is saved
- Cwhen the program runs
- Dwhen the program is loaded into memory
66. This array field holds the number of elements that the array has
- Asize
- Belements
- Clength
- Dwidth
77. This search algorithm steps through an array, comparing each item with the search value
- Abinary search
- Bsequential search
- Cselection search
- Diterative search
88. This search algorithm repeatedly divides the portion of an array being searched in half
- Abinary search
- Bsequential search
- Cselection search
- Diterative search
99. This is the typical number of comparisons performed by the sequential search on an array of N elements
- A2N
- BN
- CN^2
- DN/2
1010. When initializing a two-dimensional array, you enclose each row's initialization list in
- Abraces
- Bparentheses
- Cbrackets
- Dquotation marks
1111. To insert an item at a specific location in an ArrayList object, you use this method
- Astore
- Binsert
- Cadd
- Dget
1212. To delete an item from an ArrayList object, you use this method
- Aremove
- Bdelete
- Cerase
- Dget
1313. To determine the number of items stored in an ArrayList object, you use this method
- Asize
- Bcapacity
- Citems
- Dlength
1414. Java does not allow a statement to use a subscript that is outside the range of valid subscripts for an array
- ATrue
- BFalse
1515. An array's size declarator can be a negative integer expression
- ATrue
- BFalse
1616. Both of the following declarations are legal and equivalent:
int[ ] numbers ;
int numbers[ ] ;- ATrue
- BFalse
1717. The subscript of the last element in a single-dimensional array is one less than the total number of elements in the array
- ATrue
- BFalse
1818. The values in an initialization list are stored in the array in the order that they appear in the list
- ATrue
- BFalse
1919. The Java compiler does not display an error message when it process a statement that uses an invalid subscript
- ATrue
- BFalse
2020. When an array is passed to a method, the method has access to the original array
- ATrue
- BFalse
2121. The first size declarator in the declaration of a two-dimensional array represents the number of columns. The second size declarator represents the number of rows
- ATrue
- BFalse
2222. A two-dimensional array has multiple length fields
- ATrue
- BFalse
2323. An ArrayList automatically expands in size to accommodate the items stored in it
- ATrue
- BFalse
Information
- Description
- Exam CIS 2348 Quiz on Chapter 7: Starting Out With Java Review Questions, created by . . on 03/05/2016.
- Author
- . .
- Language
- English
- Views
- 4
- Tags
- Rating
- No ratings yet Rate this quiz