MCQOPTIONS
Saved Bookmarks
This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your General Principles knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
You need to store elements in a collection that guarantees that no duplicates are stored. Which one of the following interfaces provide that capability? |
| A. | Javutil.List |
| B. | Javutil.Map |
| C. | None of the above |
| D. | Javutil.Collection |
| Answer» C. None of the above | |
| 2. |
Which of the following are Java reserved words? |
| A. | 1 and 2 |
| B. | 2 and 3 |
| C. | 3 and 4 |
| D. | 2 and 4 |
| Answer» C. 3 and 4 | |
| 3. |
Suppose that you would like to create an instance of a new Map that has an iteration order that is the same as the iteration order of an existing instance of a Map . Which concrete implementation of the Map interface should be used for the new instance? |
| A. | TreeMap |
| B. | HashMap |
| C. | LinkedHashMap |
| D. | The answer depends on the implementation of the existing instance. |
| Answer» D. The answer depends on the implementation of the existing instance. | |