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 Structures40 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 I/O40 Questions
Exam 11: GUI Applications–Part 140 Questions
Exam 12: GUI Applications–Part 240 Questions
Exam 13: Applets and More40 Questions
Exam 14: Creating GUI Applications with JavaFX40 Questions
Exam 15: Recursion20 Questions
Exam 16: Databases40 Questions
Select questions type
A(n) ________ is used as an index to pinpoint a specific element within an array.
(Multiple Choice)
4.9/5
(42)
When an array of objects is declared, but not initialized, the array values are set to 0.
(True/False)
4.9/5
(29)
Which of the following is a correct method header for receiving a two-dimensional array as an argument?
(Multiple Choice)
4.9/5
(39)
For the following code, what would be the value of str[2]?
String[] str = {"abc", "def", "ghi", "jkl"};
(Multiple Choice)
4.8/5
(37)
What will be the result of the following code?
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
(40)
Java provides a mechanism known as ________, which makes it possible to write a method that takes a variable number of arguments.
(Multiple Choice)
4.8/5
(29)
The String[] args parameter in the main method header allows the program to receive arguments from the operating system command line.
(True/False)
4.7/5
(34)
You use this method to determine the number of items stored in an ArrayList object.
(Multiple Choice)
4.8/5
(40)
To return an array of long values from a method, use this as the return type for the method.
(Multiple Choice)
4.8/5
(35)
What will be the result of the following code?
Int[] numbers = {50, 10, 15, 20, 25, 100, 30};
Int value = 0;
For (int i = 0; i < numbers.length; i++)
Value += numbers[i];
(Multiple Choice)
4.8/5
(35)
What does <String> specify in the following statement?
ArrayList<String> nameList = new ArrayList<String>();
(Multiple Choice)
4.9/5
(42)
Java does not limit the number of dimensions that an array may have.
(True/False)
4.9/5
(38)
Given the following two-dimensional array declaration, which statement is true?
Int[][] numbers = new int[6][9];
(Multiple Choice)
4.9/5
(35)
Which of the statements are true about the following code?
Final int ARRAY_SIZE = 10;
Long[] array1 = new long[ARRAY_SIZE];
(Multiple Choice)
4.9/5
(41)
This method returns a string representing all of the items stored in an ArrayList object.
(Multiple Choice)
4.9/5
(33)
The Java compiler does not display an error message when it processes a statement that uses an invalid subscript.
(True/False)
4.7/5
(31)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)