Multiple choice

Which of the following constructors of the HashMap class throws NullPointerException in java collection framework?

  1. public HashMap(int initialCapacity, float loadFactor)

  2. public HashMap()

  3. public HashMap(Map<!--? extends K,? extends V--> m)

  4. both (1) and (3)

  5. none of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

It throws NullPointerException, if the specified map is null