What is the use of adding a null key or value to a HashMap in Java?

前端 未结 7 1418
挽巷
挽巷 2020-12-12 16:19

HashMap allows one null key and any number of null values. What is the use of it?

7条回答
  •  长情又很酷
    2020-12-12 16:51

    Another example : I use it to group Data by date. But some data don't have date. I can group it with the header "NoDate"

提交回复
热议问题