A

Admin • 828.70K Points
Coach

Q. Which exception is thrown if null key is inserted in Hashtable?

  • (A) IllegalArgumentException
  • (B) NullPointerException
  • (C) UnsupportedOperationException
  • (D) IllegalStateException
  • Correct Answer - Option(B)
  • Views: 12
  • Filed under category Java
  • Hashtags: Java Map

Explanation by: Admin
Hashtable does not allow null keys and throws NullPointerException.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.