Exam 8: Arrays
Exam 1: Creating Java Programs61 Questions
Exam 2: Using Data67 Questions
Exam 3: Using Methods Classes and Objects66 Questions
Exam 4: More Object Concepts66 Questions
Exam 5: Making Decisions66 Questions
Exam 6: Looping66 Questions
Exam 7: Characters Strings and the Stringbuilder68 Questions
Exam 8: Arrays66 Questions
Exam 9: Advanced Array Concepts66 Questions
Exam 10: Introduction to Inheritance66 Questions
Exam 11: Advanced Inheritance Concepts66 Questions
Exam 12: Exception Handling66 Questions
Exam 13: File Input and Output66 Questions
Exam 14: Introduction to Swing Components66 Questions
Exam 15: Advanced Gui Topics66 Questions
Exam 16: Graphics66 Questions
Select questions type
If a class has only a default constructor, you must call the constructor using the keyword ____ for each declared array element.
(Multiple Choice)
4.9/5
(86)
When working with arrays, why is it beneficial to use a loop with a declared constant equal to the size of the array?
(Essay)
4.7/5
(84)
When populating an array with an initialization list, you do not need to use the new keyword or provide an array size. Explain why this is the case.
(Essay)
4.8/5
(75)
Many programmers feel that breaking out of a for loop early disrupts the loop flow and makes the code harder to understand.
(True/False)
4.9/5
(65)
double[] studentScores;
double studentScores[];
Are both of the above statements valid for declaring an array variable? Why or why not?
(Essay)
5.0/5
(79)
When you want to determine whether a variable holds one of many valid values, one option is to use a do…while loop to compare the variable to a series of valid values.
(True/False)
4.9/5
(70)
When any primitive type is passed to a method, the ____________________ is passed.
(Short Answer)
4.8/5
(80)
When you create an array variable, memory space is automatically reserved.
(True/False)
4.7/5
(80)
A(n) ____ loop allows you to cycle through an array without specifying the starting and ending points for the loop control variable.
(Multiple Choice)
5.0/5
(75)
When any ____ type ( boolean , char , byte , short , int , long , float , or double ) is passed to a method, the value is passed.
(Multiple Choice)
4.9/5
(81)
When you declare an array name, no computer memory address is assigned to it. Instead, the array variable name has the special value ____, or Unicode value '\u0000'.
(Multiple Choice)
5.0/5
(76)
A(n) ____ is an integer contained within square brackets that indicates one of an array's variables.
(Multiple Choice)
4.7/5
(71)
Which of the following println statements will display the last myScores element in an array of 10?
(Multiple Choice)
4.8/5
(73)
The following statement declares an array:
int[] scoreArray = {2, 14, 35, 67, 85};
final int INCREASE = 3;
Create a loop that will add INCREASE to every array element. Use the length field in the loop that will contain the number of elements in the array.
(Essay)
4.9/5
(68)
String[] countyNames = {"Clark", "Delaware", "Madison"};
Using the above statement, what will be the value of countyNames[0] , countyNames[1] , and countyNames[2] ?
(Essay)
4.7/5
(68)
Match each term with the correct statement below.
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(67)
When you create an array of objects, each reference is assigned the value ____.
(Multiple Choice)
4.9/5
(84)
Individual array elements are ____ by value when a copy of the value is made and used within the receiving method.
(Multiple Choice)
4.9/5
(78)
Write the statement to declare an array variable named studentScores with type double . Write a second statement to create an array of 10 objects of type double .
(Short Answer)
4.8/5
(87)
Providing values for all the elements in an array is called ____ the array.
(Multiple Choice)
4.8/5
(85)
Showing 41 - 60 of 66
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)