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
Match each term with the correct statement below.
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(29)
double[][] empSales = new double[5][];
The above statement declares a(n) ____ array.
(Multiple Choice)
4.8/5
(39)
The ArrayList class ____ method removes an item from an ArrayList at a specified location.
(Multiple Choice)
4.9/5
(30)
Programmers often refer to a ____ search as a "divide and conquer" procedure.
(Multiple Choice)
4.9/5
(37)
What is the advantage of declaring an ArrayList with a specified type?
(Essay)
4.8/5
(43)
Write the statement to declare an ArrayList named myVals with a capacity of 15 items. Explain the importance of capacity when working with an ArrayList .
(Essay)
4.9/5
(42)
enum Color {RED, GREEN, BLUE}
public class EnumOrdinal
{
public static void main(String[] args)
{
---Code here---
---Code here---
---Code here---
}
}
The above code demonstrates the use of the enum ordinal() method to get the ordinal value of an enum constant. Fill in the indicated lines with println() statements that will get the ordinal of the enumeration constant. Describe the output that will display when the code is executed.
(Essay)
4.7/5
(29)
How can you use the length field with a two-dimensional array? Show an example two-dimensional array declaration and provide the length values for the example array.
(Essay)
4.8/5
(29)
The bubble sort is the fastest and most efficient sorting technique.
(True/False)
4.7/5
(28)
The simplest possible sort involves two values that are out of order.
(True/False)
4.7/5
(31)
Regarding enumerations, the ____ method returns an integer that represents the constant's position in the list of constants; as with arrays, the first position is 0.
(Multiple Choice)
4.7/5
(44)
import java.util.*;
public class sortArray
{
public static void main(String[] args)
{
double[] lengths = {120.0, 0.5, 0.0, 999.0, 77.3};
Arrays.sort(lengths);
System.out.println(Arrays.toString(lengths));
}
}
Using the above code, what will be the output of the println statement when the code is executed?
(Essay)
4.8/5
(36)
The negative integer returned by the binarySearch() method when the value is not found is the negative equivalent of the array ____.
(Multiple Choice)
4.8/5
(43)
____ is the process of arranging a series of objects in some logical order.
(Multiple Choice)
5.0/5
(30)
The Arrays class ____ methods are a new feature in Java 8 that makes sorting more efficient when thousands or millions of objects need to be sorted.
(Multiple Choice)
4.7/5
(33)
An ArrayList 's ____ is the number of items it can hold without having to increase its size.
(Multiple Choice)
4.8/5
(40)
Showing 41 - 60 of 66
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)