Exam 7: Arrays and the Arraylist Class
Exam 1: Introduction to Computers and Java51 Questions
Exam 2: Java Fundamentals61 Questions
Exam 3: Decision Structures64 Questions
Exam 4: Loops and Files57 Questions
Exam 5: Methods60 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class64 Questions
Exam 8: A Second Look at Classes and Objects50 Questions
Exam 9: Text Processing and More About Wrapper Classes60 Questions
Exam 10: Inheritance70 Questions
Exam 11: Exceptions and Advanced File IO56 Questions
Exam 12: A First Look at GUI Applications60 Questions
Exam 13: Advanced GUI Applications58 Questions
Exam 14: Applets and More54 Questions
Exam 15: Creating GUI Applications With Javafx and Scene Builder40 Questions
Exam 16: Recursion42 Questions
Exam 17: Databases48 Questions
Select questions type
Java does not limit the number of dimensions that an array may have.
Free
(True/False)
4.9/5
(40)
Correct Answer:
True
What is the value of scores[2][3] in the following array? int [] [] scores = { {88, 80, 79, 92}, {75, 84, 93, 80},
{98, 95, 92, 94}, {91, 84, 88, 96} };
Free
(Multiple Choice)
4.8/5
(42)
Correct Answer:
A
What would be the results of the following code? int[] x = { 55, 33, 88, 22, 99,
11, 44, 66, 77 };
Int a = 10;
If(x[2] > x[5])
A = 5;
Else
A = 8;
Free
(Multiple Choice)
4.8/5
(48)
Correct Answer:
A
When an individual element of an array is passed to a method:
(Multiple Choice)
4.9/5
(40)
You use this method to determine the number of items stored in an ArrayList object.
(Multiple Choice)
4.8/5
(37)
Objects in an array are accessed with subscripts, just like any other data type in an array.
(True/False)
4.8/5
(32)
If a[] and b[] are two integer arrays, the expression a == b compares the array contents.
(True/False)
4.9/5
(39)
By default, Java initializes array elements with what value?
(Multiple Choice)
4.9/5
(31)
What does the following statement do? double[] array1 = new double[10];
(Multiple Choice)
4.8/5
(46)
It is common practice to use a ____________ variable as a size declarator.
(Multiple Choice)
4.9/5
(43)
If final int SIZE = 15 and int[] x = new int[SIZE], what would be the range of subscript values that could be used with x[]?
(Multiple Choice)
4.7/5
(44)
A sorting algorithm is a technique for scanning through an array and rearranging its contents in some specific order.
(True/False)
4.8/5
(35)
What would be the results of the following code? final int SIZE = 25;
Int[] array1 = new int[SIZE];
… // Code that will put values in array1
Int value = 0;
For (int a = 0; a < array1.length; a++)
{
Value += array1[a];
}
(Multiple Choice)
4.9/5
(39)
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];
}
(Multiple Choice)
4.7/5
(42)
Java limits the number of dimensions that an array may have to 15.
(True/False)
4.8/5
(33)
This indicates the number of elements, or values, the array can hold.
(Multiple Choice)
4.9/5
(36)
Showing 1 - 20 of 64
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)