Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    Because they didn't feel a need to disallow it. Commented Dec 11, 2017 at 5:59
  • You can use a null key when you can get a default value from the map when there is no key maybe.. Asking why only one allowance does not seem a reasonable question. Commented Dec 11, 2017 at 6:02
  • I agree, I don't get the exact reason for above question either. Why did you ask this question? What problem do you have with the functionality? Commented Dec 11, 2017 at 6:03
  • See also: stackoverflow.com/a/9912908/1441122 and stackoverflow.com/a/9298113/1441122 Commented Dec 11, 2017 at 21:37