Exam Objectives
Make appropriate selection of collection classes/interfaces to suit specified behavior requirements.Distinguish between correct and incorrect implementations of hashCode() (and equals()) methods.
Supplementary Objectives
Identify the core...
The Collection interface specifies the contract that all collections should implement. Some of the operations in the interface are optional, meaning that a collection may...
Review Questions
11.1
Which of these are core interfaces in the collections framework?
Select the three correct answers.
SetBagLinkedListCollectionMap11.2
Which of these implementations are provided by the java.util package?
Select the...
Unlike other implementations of the Collection interface, implementations of the Set interface do not allow duplicate elements. This also means that a set can contain...
are collections that maintain their elements in order, and can contain duplicates. The elements in a list are ordered. Each element, therefore, has a position...
11.4
Which statements are true about collections?
Select the two correct answers.
Some operations on a collection may throw an UnsupportedOperationException.Methods calling optional operations in a collection must...
Sets and maps have special interfaces, called SortedSet and SortedMap, for implementations that sort their elements in a specific order (see Figures and 11.3). Objects...
11.9
Which of these methods can be called on objects implementing the Map interface?
Select the two correct answers.
contains(Object o)addAll(Collection c)remove(Object o)values()toArray()11.10
Which statements are true about maps?
Select...
Implementing the equals(), hashCode(), and compareTo() Methods
The majority of the non-final methods of the Object class are meant to be overridden. They provide general contracts...
The collection implementations can be augmented with the following functionality:
thread-safetycollection immutability
The collection implementation classes, except for Vector and Hashtable, are not thread-safe, that is, their...
11.14
Given that the objects denoted by the parameters override the equals() and the hashCode() methods appropriately, which return values are possible from the following method?
String...
Chapter Summary
The following information was included in this chapter:
an overview of the collections framework in the java.util package: core interfaces and their implementations.discussion of the...
AJAX popular information C# language guides Windows books and cookbooks
.......
С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.