📅  最后修改于: 2022-03-11 14:52:11.002000             🧑  作者: Mango
import java.util.HashMap;
//Within a class
//You can do new HashMap();, but you don't need to
HashMap examplehashmap=new HashMap<>();
{
//put in values
examplehashmap.put(5, "example");
};
//get value
examplehashmap.get(5);
//returns "example"