<< Chapter < Page | Chapter >> Page > |
True or False? If a SortedSet object contains references to String objects, the natural ascending sort would take the difference between upper case and lower case characters into account.
True or False? A SortedSet object containing references to String objects will always take the difference between upper case and lower case characters into account when establishing the sort order.
True or False? Specific sub-interfaces of the Collection interface can define requirements that do not apply to all sub-interfaces of the Collection interface.
True or False? A collection that implements the List interface maintains its elements in ascending alphanumeric order.
True or False? A collection that implements the List interface is an unordered collection.
True or False? A collection that implements the List interface is allowed to contain duplicate values.
True or False? The contracts of the methods in the List interface are the same as the contracts of the methods inherited from the Collection interface.
True or False? The iterator method for the Collection interface returns an iterator over the elements in the collection in propersequence, where the sequence is determined by the numeric index.
True or False? The iterator method for the List interface returns an iterator over the elements in the collection in proper sequence,where the sequence is determined by the numeric index.
True or False? The SortedSet interface "guarantees that its iterator will traverse the set in ascending element order, sorted according tothe natural ordering of its elements (see Comparable ), or by a Comparator provided at sorted set creation time."
What is the meaning of the following two images?
These images were inserted here simply to insert some space between the questions and the answers to keep them from being visible on the screen at thesame time.
This image was also inserted for the purpose of inserting space between the questions and the answers.
True.
True.
False. The iterator method for the Collection interface returns an iterator over the elements in the collection where thereare no guarantees concerning the order in which the elements are returned by the methods of the Iterator object.
False. According to Oracle, "The List interface places additional stipulations, beyond those specified in the Collection interface, on the contracts of the iterator , add , remove , equals , and hashCode methods."
True. Unlike a collection that implements the Set interface, a collection that implements the List interface is typically allowed to contain duplicate values.
False. A collection that implements the List interface is an ordered collection (also known as a sequence) . According to Oracle, "The user of the interface has precise control over where in the list each element isinserted." Elements can be inserted and retrieved on the basis of their integer index (position in the list) using the following methods:
Notification Switch
Would you like to follow the 'Object-oriented programming (oop) with java' conversation and receive update notifications?