Examveda

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: Option A


This Question Belongs to Java Program >> Collections Framework In Java

Join The Discussion

Related Questions on Collections Framework in java