Exam 7: Arrays and the Arraylist Class
Exam 1: Introduction to Computers and Java40 Questions
Exam 2: Java Fundamentals40 Questions
Exam 3: A First Look at Classes and Objects40 Questions
Exam 4: Decision Structures42 Questions
Exam 5: Loops and Files40 Questions
Exam 6: A Second Look at Classes and Objects40 Questions
Exam 7: Arrays and the Arraylist Class40 Questions
Exam 8: Text Processing and Wrapper Classes40 Questions
Exam 9: Inheritance40 Questions
Exam 10: Exceptions and Advanced File Io40 Questions
Exam 11: Java-Fx: Gui Programming and Basic Controls40 Questions
Exam 12: Java-Fx: Advanced Controls40 Questions
Exam 13: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 14: Recursion24 Questions
Exam 15: Databases40 Questions
Select questions type
Which of the following is a correct method header for receiving a two-dimensional array as an argument?
(Multiple Choice)
4.9/5
(36)
Given the following two-dimensional array declaration, which statement is true?
int[ ][ ] numbers = new int[6][9];
(Multiple Choice)
4.8/5
(38)
What does <String> specify in the following statement? ArrayList<String> nameList = new ArrayList<String>();
(Multiple Choice)
4.9/5
(34)
What would be the result after the following code is executed?
int[ ] numbers = {50, 10, 15, 20, 25, 100, 30};
Int value = 0;
For (int i = 1; i < numbers.length; i++)
Value += numbers[i];
(Multiple Choice)
4.9/5
(30)
If numbers is a two-dimensional array, which of the following would give the number of columns in row r?
(Multiple Choice)
4.8/5
(33)
Which method is used to determine the number of items stored in an ArrayList object?
(Multiple Choice)
4.8/5
(37)
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} };
(Multiple Choice)
4.9/5
(33)
You can use the __________ method to replace an item at a specific location in an ArrayList.
(Multiple Choice)
4.9/5
(31)
Which of the following statements is(are) true about this code? final int ARRAY_SIZE = 10;
Long[] array1 = new long[ARRAY_SIZE];
(Multiple Choice)
5.0/5
(43)
Which of the following methods returns a string representing all of the items stored in an ArrayList object?
(Multiple Choice)
4.9/5
(35)
Which of the following is a valid declaration for a ragged array with five rows but no columns?
(Multiple Choice)
4.7/5
(35)
To return an array of long values from a method, which return type should be used for the method?
(Multiple Choice)
4.9/5
(50)
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)
5.0/5
(35)
The Java compiler will display an error message when it processes a statement that uses an invalid subscript.
(True/False)
5.0/5
(25)
A sorting algorithm is used to locate a specific item in a larger collection of data.
(True/False)
4.8/5
(38)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)