Starting Out with Java Study Set 1

Computing

Quiz 7 :

Arrays and the Arraylist Class

Quiz 7 :

Arrays and the Arraylist Class

Question Type
search
arrow
A sorting algorithm is a technique for scanning through an array and rearranging its contents in some specific order.
Free
True False
Answer:

Answer:

True

Tags
Choose question tag
close menu
arrow
Objects in an array are accessed with subscripts, just like any other data type in an array.
Free
True False
Answer:

Answer:

True

Tags
Choose question tag
close menu
arrow
By default, Java initializes array elements to __________.
Free
Multiple Choice
Answer:

Answer:

A

Tags
Choose question tag
close menu
arrow
Any items typed on the command line, separated by a 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 False
Answer:
Tags
Choose question tag
close menu
arrow
Each array in Java has a public field named __________ that contains the number of elements in the array..
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
The ___________ method is used to insert an item into an ArrayList.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
Subscripting always starts with __________.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
The String[] args parameter in the main method header allows the program to receive arguments from the operating system command-line.
True False
Answer:
Tags
Choose question tag
close menu
arrow
An ArrayList object automatically expands in size to accommodate the items stored in it.
True False
Answer:
Tags
Choose question tag
close menu
arrow
When an array of objects is declared but not initialized, the array values are set to null.
True False
Answer:
Tags
Choose question tag
close menu
arrow
If a[] and b[] are two integer arrays, the expression a == b compares the array contents.
True False
Answer:
Tags
Choose question tag
close menu
arrow
It is common practice to use a __________ variable as a size declarator.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
arrow
Java limits the number of dimensions that an array can have to 15.
True False
Answer:
Tags
Choose question tag
close menu
arrow
An array can hold multiple values of several different types of data simultaneously.
True False
Answer:
Tags
Choose question tag
close menu
arrow
A sorting algorithm is used to locate a specific item in a larger collection of data.
True False
Answer:
Tags
Choose question tag
close menu
arrow
Once an array is created, its size cannot be changed.
True False
Answer:
Tags
Choose question tag
close menu
arrow
Declaring an array reference variable does not create an array.
True False
Answer:
Tags
Choose question tag
close menu
arrow
To determine if two arrays are equal you must compare each of the elements of the two arrays.
True False
Answer:
Tags
Choose question tag
close menu
arrow
Java does not limit the number of dimensions an array may have.
True False
Answer:
Tags
Choose question tag
close menu
arrow
The __________ indicates the number of elements the array can hold.
Multiple Choice
Answer:
Tags
Choose question tag
close menu
Showing 1 - 20 of 63