Exam 15: The Java Collections Framework
Exam 1: Introduction76 Questions
Exam 2: Using Objects82 Questions
Exam 3: Implementing Classes108 Questions
Exam 4: Fundamental Data Types124 Questions
Exam 5: Decisions119 Questions
Exam 6: Loops107 Questions
Exam 7: Arrays and Array Lists117 Questions
Exam 8: Designing Classes88 Questions
Exam 9: Inheritance99 Questions
Exam 10: Interfaces100 Questions
Exam 11: Input/Output and Exception Handling108 Questions
Exam 12: Object-Oriented Design104 Questions
Exam 13: Recursion99 Questions
Exam 14: Sorting and Searching100 Questions
Exam 15: The Java Collections Framework102 Questions
Exam 16: Basic Data Structures102 Questions
Exam 17: Tree Structures102 Questions
Exam 18: Generic Classes75 Questions
Exam 19: Stream Processing85 Questions
Exam 20: Graphical User Interfaces75 Questions
Exam 21: Advanced Input/Output90 Questions
Exam 22: Multithreading81 Questions
Exam 23: Internet Networking74 Questions
Exam 24: Relational Databases75 Questions
Exam 25: XML74 Questions
Select questions type
A collection that allows items to be added only at one end and removed only at the other end is called a ____.
(Multiple Choice)
4.8/5
(33)
Assume that you have declared a map named myMap to hold String values with Integer keys.Which of the following statements will correctly add an association into myMap?
(Multiple Choice)
4.9/5
(43)
You need a data structure in your program for evaluating algebraic expressions.Which data structure would be most appropriate to model this situation?
(Multiple Choice)
4.7/5
(40)
You need to access values in the opposite order in which they were added (last in, first out), and not randomly.Which collection type should you use?
(Multiple Choice)
4.8/5
(33)
Select an appropriate expression to complete the following method, which is designed to return the sum of the two smallest values in the parameter array numbers.

(Multiple Choice)
4.9/5
(41)
Consider the following code snippet:
Map<String, Integer> scores;
You expect to retrieve elements randomly by key, and want fastest retrieval times.Which of the following statements will create a structure to support this?
(Multiple Choice)
4.7/5
(40)
Assume you have created a linked list named myList that currently holds some number of String objects.Which of the following statements correctly adds a new element to the beginning of myList?
(Multiple Choice)
4.8/5
(30)
You need a data structure in your program for balancing parentheses in an expression.Which data structure would be most appropriate to model this situation?
(Multiple Choice)
4.8/5
(38)
Consider the following code snippet:
What output will be produced when this code is executed?

(Multiple Choice)
4.9/5
(34)
Using the merge method of the Map interface, which statement correctly updates the salesTotalByDept map of type Map<String,Integer> to update the sales total for a dept by an integer sales value?
(Multiple Choice)
4.8/5
(27)
Select an appropriate expression to complete the method below.The method should return the number of times that the string stored in name appears in theList.

(Multiple Choice)
4.7/5
(36)
Suppose we have two String objects and treat the characters in each string from beginning to end in the following way: With one string, we push each character on a stack.With the other string, we add each character to a queue.After processing both strings, we then pop one character from the stack and remove one character from the queue, and compare the pair of characters to each other.We do this until the stack and the queue are both empty.What does it mean if all the character pairs match?
(Multiple Choice)
4.8/5
(38)
When using the add method of the ListIterator to add an element to a linked list, which of the following statements is correct?
(Multiple Choice)
4.7/5
(36)
Select an appropriate expression to complete the following code segment, which is designed to print a message if the string stored in name is the first element of the players linked list.

(Multiple Choice)
4.8/5
(27)
Assume that you have declared a queue named myQueue to hold String elements.Which of the following statements will correctly insert an element into myQueue?
(Multiple Choice)
4.7/5
(29)
Print jobs submitted to a printer would probably be stored in which type of data structure?
(Multiple Choice)
4.8/5
(29)
Showing 61 - 80 of 102
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)