Date: 2020/1/14
Function: hashmap simple and practical
IDE:Intellij IDEA
Map is the interface in java another set of key-value store this key value pair, is HashMap map implementation class, stored more efficiently, Further, such a key can HashMap storage of null-null
package testDemo;
import java.util.*;
public class Test {
public static void main(String[] args){
Map map = new HashMap();
map.put("one","一");
map.put("two","二");
map.put("three","三");
map.put("three","3");
System.out.println(map.keySet());
System.out.println(map.values());
map.remove("two");
System.out.println(map.values());
}
}
Output is as follows:
[One, TWO, Three]
[I, II, 3]
[I, 3]