/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
	 Map<String,String> map = new HashMap<String,String>();

        map.put("1", "One");
        map.put("2", "Two");
        map.put("3", null);
        map.put("4", "Four");
        map.put("5", null);
        
         System.out.println(map);
        
        map.values().removeIf(Objects::isNull);
        
        System.out.println(map);
	}
}