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
Given that String[ ] str has been initialized, to get a copy of str[0] with all the characters converted to uppercase, you would use the __________ statement.
(Multiple Choice)
4.9/5
(31)
What would be the result of executing the following code?
int[ ] x = {0, 1, 2, 3, 4, 5};
(Multiple Choice)
4.7/5
(35)
In Java, you do not use the new operator when you use a(n) ____________.
(Multiple Choice)
4.9/5
(38)
The __________ method removes an item from an ArrayList at a specific index.
(Multiple Choice)
4.7/5
(31)
A sorting algorithm is used to locate a specific item in a larger collection of data.
(True/False)
4.7/5
(36)
If a[ ] and b[ ] are two integer arrays, the expression a == b compares the array contents.
(True/False)
4.8/5
(33)
Given the following two-dimensional array declaration, which statement is true?
int[ ][ ] numbers = new int[6][9];
(Multiple Choice)
5.0/5
(41)
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.8/5
(41)
Which of the following for loops is valid, given the following declaration?
String[ ] names = {"abc", "def", "ghi", "jkl"};
(Multiple Choice)
4.8/5
(41)
Which of the following ArrayList class methods is used to insert an item at a specific location in an ArrayList?
(Multiple Choice)
4.9/5
(35)
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.7/5
(35)
Which of the following statements is(are) true about this code? final int ARRAY_SIZE = 10;
Long[ ] array1 = new long[ARRAY_SIZE];
(Multiple Choice)
4.9/5
(36)
What would be the result after the following code is executed?
int[ ] x = {23, 55, 83, 19};
Int[ ] y = {36, 78, 12, 24};
X = y;
Y = x;
(Multiple Choice)
4.8/5
(38)
Showing 41 - 60 of 63
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)