[Java Basics] Handling the null key and unmodifiedmap in the map

It should be handled with remove and get, but if you want to operate an unmodifiedmap,
you can use another class to accept it and process this new class

if(map.containsKey(null)){
    
    
			Map operateMap = new HashMap();
			operateMap.putAll(map);
			operateMap.put("null", map.get(null));
			operateMap.remove(null);
			 
		}

Guess you like

Origin blog.csdn.net/u010010600/article/details/112615496