Java, Spring, Microservices, Interview, Coding.
there can only be one null key in HashMap. While storing the Entry object HashMap implementation checks if the key is null, in case key is null, it always map to bucket 0, as hash is not calculated for null keys. HashMap changes in Java 8 Though HashMap implementation in Java provides constant time