Exam 9: Advanced Array Concepts
Exam 1: Creating Your First Java Classes76 Questions
Exam 2: Using Data81 Questions
Exam 3: Using Methods, Classes and Objects79 Questions
Exam 4: More Object Concepts84 Questions
Exam 5: Making Decisions80 Questions
Exam 6: Looping77 Questions
Exam 7: Characters, Strings and the Stringbuilder82 Questions
Exam 8: Arrays77 Questions
Exam 9: Advanced Array Concepts80 Questions
Exam 10: Introduction to Inheritance78 Questions
Exam 11: Advanced Inheritance Concepts78 Questions
Exam 12: Exception Handling79 Questions
Exam 13: File Input and Output78 Questions
Exam 14: Introduction to Swing Components79 Questions
Exam 15: Using Javafx and Scene Builder65 Questions
Select questions type
int[][] myVals = {{10, 15, 20, 25},
{30, 35, 40, 45, 50, 55, 60},
{65, 70, 75, 80, 85, 90}};
Using the above array, what is the value of myVals.length ? What is the value of myVals[1].length ? What is the value of myVals[2].length ? Explain how you determined these values.
(Essay)
4.7/5
(47)
When you place objects in order beginning with the object that has the highest value, you are sorting in ____ order.
(Multiple Choice)
4.9/5
(32)
____ is the process of arranging a series of objects in some logical order.
(Multiple Choice)
4.9/5
(43)
Match each term with the correct statement below.
Premises:
Use them with the class name without instantiating an object
Responses:
set() method
jagged array
Enumerated data type
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(33)
What is the advantage of declaring an ArrayList with a specified type?
(Essay)
4.9/5
(32)
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.8/5
(37)
Regarding enumerations, the ____ method returns the name of the calling constant object.
(Multiple Choice)
4.9/5
(40)
The ArrayList class ____ method removes an item from an ArrayList at a specified location.
(Multiple Choice)
4.9/5
(26)
import javax.swing.*;
class FindPoints
{
public static void main(String[] args)
{
int[][] points =
{{10, 20, 30},
{20, 40, 60},
{40, 60, 80}};
String prompt;
int class;
int level;
prompt = JOptionPane.showInputDialog(null, "Class: ");
class = Integer.parseInt(prompt);
prompt = JOptionPane.showInputDialog(null, "Level: ");
level = Integer.parseInt(prompt);
JOption.showMessageDialog(null, "Your points: " + ---complete code here-----);
}
}
The above code depicts a two-dimensional array named points that refers to a Class and Level to determine a point value. Complete the JOption command so that the code will determine a point value based on the points array.
(Essay)
4.8/5
(30)
Match each term with the correct statement below.
Premises:
A popularly known sorting method
Responses:
ascending order
matrix
static methods
Correct Answer:
Premises:
Responses:
(Matching)
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.8/5
(30)
The bubble sort is the fastest and most efficient sorting technique.
(True/False)
4.8/5
(44)
In a(n) ____, you repeatedly compare pairs of items, swapping them if they are out of order, eventually creating a sorted list.
(Multiple Choice)
4.9/5
(40)
Match each term with the correct statement below.
Premises:
Can be pictured as a column of values
Responses:
type-safe
Enumerated data type
one-dimensional array
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(32)
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.9/5
(32)
Match each term with the correct statement below.
Premises:
Placing objects in order beginning with the lowest value
Responses:
multidimensional array
set() method
ascending order
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(33)
The ArrayList class ____ method retrieves an item from a specified location in an ArrayList .
(Multiple Choice)
4.9/5
(38)
Showing 21 - 40 of 80
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)