MCQOPTIONS
Saved Bookmarks
| 1. |
What happens if we put a key object in a HashMap which exists? |
| A. | The new object replaces the older object |
| B. | The new object is discarded |
| C. | The old object is removed from the map |
| D. | It throws an exception as the key already exists in the map |
| Answer» B. The new object is discarded | |