Is there a way to add a key to a HashMap without also adding a value? I know it seems strange, but I have a HashMap> amd I wan
HashMap>
You can put null values. It is allowed by HashMap
null
HashMap
You can also use a Set initially, and check it for the key, and then fill the map.
Set