Exam 16: Collections and Iterators
Exam 1: Getting Started46 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control43 Questions
Exam 4: Defining Classes I44 Questions
Exam 5: Defining Classes Ii46 Questions
Exam 6: Arrays47 Questions
Exam 7: Inheritance43 Questions
Exam 8: Console Input and Output43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class31 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends18 Questions
Exam 11: Recursion43 Questions
Exam 20: Applets25 Questions
Select questions type
What must you do before adding a primitive type to a vector?
Free
(Essay)
4.8/5
(32)
Correct Answer:
The primitive type must be converted to its corresponding wrapper type.A primitive integer value of 37 can easily converted to a corresponding Integer object: new Integer(37);
All of the following are methods of the Iterator interface except:
Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
A
The List interface is for collections that allow repetition of elements and do not impose an order on their elements.
Free
(True/False)
4.9/5
(36)
Correct Answer:
False
If you want a class that implements the List interface and do not need any methods beyond those in the List interface,you can use the ____________ class.
(Multiple Choice)
4.9/5
(42)
Classes that implement the Set interface allows duplicate elements to occur.
(True/False)
4.8/5
(33)
If you want a class that implements the Map interface and do not need any methods beyond those in the Map interface,you can use the ____________ class.
(Multiple Choice)
4.9/5
(32)
The difference between the List<T> interface and the Set<T> interface is that the Set<T> interface does not impose an order on its unique elements.
(True/False)
4.9/5
(32)
Create a for loop to initially set the values of the vector created in number 1 above to the value of negative 1.0.
(Essay)
5.0/5
(35)
The AbstractSequentialList class provides efficient implementation of sequentially moving through the list at the expense of having inefficient implementation of random access to elements.
(True/False)
4.8/5
(34)
Write a method named displayList()that has one parameter of type Vector and has a return value of void.The method uses an iterator to display the contents of the Vector.
(Essay)
4.7/5
(40)
All of the following are members of Java's Collection class except:
(Multiple Choice)
4.8/5
(40)
The primary interface/interfaces for a collection class is/are:
(Multiple Choice)
4.9/5
(46)
All of the following methods are part of the Collection<T> interface except:
(Multiple Choice)
4.8/5
(39)
The interface SortedSet and the concrete class _________ is designed for implementations of the Set interface that provide for rapid retrieval of elements.
(Multiple Choice)
4.8/5
(32)
A Java collection is any class that implements the Collection interface.
(True/False)
4.8/5
(45)
If you want a class that implements the Set interface and do not need any methods beyond those in the Set interface,you can use the concrete class:
(Multiple Choice)
4.8/5
(40)
Showing 1 - 20 of 44
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)