Exam 9: Advanced Array Concepts
Exam 1: Creating Java Programs61 Questions
Exam 2: Using Data67 Questions
Exam 3: Using Methods Classes and Objects66 Questions
Exam 4: More Object Concepts66 Questions
Exam 5: Making Decisions66 Questions
Exam 6: Looping66 Questions
Exam 7: Characters Strings and the Stringbuilder68 Questions
Exam 8: Arrays66 Questions
Exam 9: Advanced Array Concepts66 Questions
Exam 10: Introduction to Inheritance66 Questions
Exam 11: Advanced Inheritance Concepts66 Questions
Exam 12: Exception Handling66 Questions
Exam 13: File Input and Output66 Questions
Exam 14: Introduction to Swing Components66 Questions
Exam 15: Advanced Gui Topics66 Questions
Exam 16: Graphics66 Questions
Select questions type
What import statements must be used before you can use an ArrayList class?
(Essay)
5.0/5
(45)
import java.util.*;
public class myArray
{
public static void main(String[] args)
{
int myVals = new int[4];
-----Code here-----
display("My values are: ", myVals);
}
public static void display(String message, int array[])
{
int arraySize = array.length;
System.out.print(message);
for(int x = 0; x
System.out.print(array[x] + " ");
}
}
Using the above code, complete the indicated section with a fill method() to fill each array element with a value of 2. What will be displayed after the display() method is executed?
(Essay)
4.8/5
(43)
An array that you can picture as a column of values, and whose elements you can access using one subscript, is a ____ array.
(Multiple Choice)
4.8/5
(34)
When using the Arrays.binarySearch() method, it is not necessary for the list to be in order because the binarySearch() method will sort the items when called.
(True/False)
4.7/5
(40)
When you pass a two-dimensional array to a method, you pass the array name just as you do with a one-dimensional array.
(True/False)
4.9/5
(39)
Using the ArrayList add() method, write the statement to insert "July" in the first position of the months ArrayList . Describe what would happen if the position number is invalid for the ArrayList .
(Essay)
4.9/5
(31)
Showing 61 - 66 of 66
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)