Exam 7: Arrays and the Arraylist Class
Exam 1: Introduction to Computers and Java53 Questions
Exam 2: Java Fundamentals52 Questions
Exam 3: Decision Structures58 Questions
Exam 4: Loops and Files56 Questions
Exam 5: Methods56 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class63 Questions
Exam 8: A Second Look at Classes and Objects52 Questions
Exam 9: Text Processing and More About Wrapper Classes62 Questions
Exam 10: Inheritance64 Questions
Exam 11: Exceptions and Advanced File Io59 Questions
Exam 12: Java-Fx: Gui Programming and Basic Controls42 Questions
Exam 13: Java-Fx: Advanced Controls40 Questions
Exam 14: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 15: Recursion23 Questions
Exam 16: Databases40 Questions
Select questions type
The __________ indicates the number of elements the array can hold.
(Multiple Choice)
4.9/5
(39)
Each array in Java has a public field named __________ that contains the number of elements in the array..
(Multiple Choice)
4.9/5
(31)
If numbers is a two-dimensional int array that has been initialized and total is an int that has been set to 0, which of the following will sum all the elements in the array?
(Multiple Choice)
4.9/5
(46)
What will be the value of x[8] after the following code is executed?
final int SUB = 12;
Int[ ] x = new int[SUB];
Int y = 100;
For(int i = 0; i < SUB; i++)
{
X[i] = y;
Y += 10;
}
(Multiple Choice)
4.8/5
(34)
What will be the results after the following code is executed?
int[ ] x = { 55, 33, 88, 22, 99, 11, 44, 66, 77 };
Int a = 10;
If(x[2] > x[5])
A = 5;
Else
A = 8;
(Multiple Choice)
4.8/5
(29)
What will be the results after the following code is executed?
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];
}
(Multiple Choice)
4.8/5
(35)
What will be the result after the following code is executed?
final int ARRAY_SIZE = 5;
Float[ ] x = float[ARRAY_SIZE];
For (i = 1; i <= ARRAY_SIZE; i++)
{
X[i] = 10.0;
}
(Multiple Choice)
4.8/5
(26)
To determine if two arrays are equal you must compare each of the elements of the two arrays.
(True/False)
4.8/5
(48)
What would be the result after the following code is 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.9/5
(42)
When an individual element of an array is passed to a method __________.
(Multiple Choice)
4.9/5
(35)
An array can hold multiple values of several different types of data simultaneously.
(True/False)
4.8/5
(34)
An ArrayList object automatically expands in size to accommodate the items stored in it.
(True/False)
4.8/5
(47)
What would be the result after the following code is executed?
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.8/5
(37)
A sorting algorithm is a technique for scanning through an array and rearranging its contents in some specific order.
(True/False)
4.9/5
(37)
What would be the result after the following code is executed?
int[ ] numbers = {40, 3, 5, 7, 8, 12, 10};
Int value = numbers[0];
For (int i = 1; i < numbers.length; i++)
{
If (numbers[i] < value)
Value = numbers[i];
}
(Multiple Choice)
4.8/5
(30)
Showing 21 - 40 of 63
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)