Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Starting Out with Java
Quiz 7: Arrays and the Arraylist Class
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 1
Multiple Choice
Given that String[] str has been initialized, to get a copy of str[0] with all characters converted to upper case, use the following statement:
Question 2
Multiple Choice
Subscript numbering always starts at what value?
Question 3
Multiple Choice
What do you call the number that is used as an index to pinpoint a specific element within an array?
Question 4
Multiple Choice
What would be the results after the following code was executed? int[] x = {23, 55, 83, 19}; Int[] y = {36, 78, 12, 24}; For(int a = 0; a < x.length; a++) { X[a] = y[a]; Y[a] = x[a]; }
Question 5
Multiple Choice
What will be the value of x[1] after the following code is executed? int[] x = {22, 33, 44}; ArrayProcess(x) ; ⦠Public static void arrayProcess(int[] a) { For(int k = 0; k < 3; k++) { A[k] = a[k] + 5; } }
Question 6
Multiple Choice
Java performs ____________, which means that it does not allow a statement to use a subscript that is outside the range of valid subscripts for the array.
Question 7
Multiple Choice
It is common practice to use a ____________ variable as a size declarator.
Question 8
Multiple Choice
In memory, an array of String objects
Question 9
Multiple Choice
When an array is passed to a method:
Question 10
Multiple Choice
What do you normally use with a partially-filled array?
Question 11
Multiple Choice
This indicates the number of elements, or values, the array can hold.
Question 12
Multiple Choice
Each array in Java has a public field named ____________ that contains the number of elements in the array.
Question 13
Multiple Choice
In Java, you do not use the new operator when you use a(n) :
Question 14
Multiple Choice
What does the following statement do? double[] array1 = new double[10];
Question 15
Multiple Choice
What will be the results of the following code? final int ARRAY_SIZE = 5; Double[] x = new double[ARRAY_SIZE]; For(int i = 1; i <= ARRAY_SIZE; i++) { X[i] = 10.0; }
Question 16
Multiple Choice
To return an array of long values from a method, use this as the return type for the method.
Question 17
Multiple Choice
What would be the results of the following code? int[] array1 = new int[25]; ⦠// Code that will put values in array1 Int value = array1[0]; For (int a = 1; a < array1.length; a++) { If (array1[a] < value) Value = array1[a]; }