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
In Java, boolean array elements automatically are assigned the value ____.
(Multiple Choice)
5.0/5
(70)
int[] multsOfTen = {10, 20, 30, 40, 50, 60};
The above code creates an array named multsOfTen . Describe how array sizes are determined when using an initialization list and how memory is assigned.
(Essay)
4.9/5
(81)
While you can provide any legal identifier you want for an array, conventional rules are typically followed. List and describe the naming conventions for naming arrays.
(Essay)
4.9/5
(77)
double[] studentScores = new double[3];
studentScores[0] = 93;
studentScores[1] = 77;
studentScores[2] = 85;
Write a println statement to display the last element of the studentScores array.
(Short Answer)
4.7/5
(92)
public class CostArray
{
public static void main(String[] args)
{
double[] costs = new double[3];
costs[0] = 5.00;
costs[1] = 7.00;
costs[2] = 9.00;
System.out.println(costs[3]);
}
}
Once the above code is compiled and executed, an error message is generated. Explain the error message that will result and explain the reason for the error.
(Essay)
4.8/5
(79)
When using an array with all elements used, why would a programmer use a loop control variable from 0 to one less than the size of the array? Give an example.
(Essay)
4.7/5
(82)
Showing 61 - 66 of 66
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)