import java.util.Collections; import java.util.Map; public class Example { public static void main(String[] args) { MapIn the above example, we first import the java.util.Collections library and then use the emptyMap() method to create an empty immutable map of type MapemptyMap = Collections.emptyMap(); System.out.println(emptyMap); // Output: {} emptyMap.put("one", 1); // This line will throw UnsupportedOperationException } }