A

Admin • 831K Points
Coach

Q. What will `add(null)` do in a `LinkedList` used as a Queue?

  • (A) Add null successfully
  • (B) Throw NullPointerException
  • (C) Remove all nulls
  • (D) Block the thread
  • Correct Answer - Option(A)
  • Views: 11
  • Filed under category Java
  • Hashtags: Java Queue

Explanation by: Admin
LinkedList allows null elements.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.