Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Map;

public class Main {

    public static void clearNullElement(Map<?, ?> map) {
        if (map == null)
            return;
        Object[] vs = map.keySet().toArray();
        for (Object o : vs) {
            if (null == map.get(o))
                map.remove(o);
        }
    }
}