您的位置:首页 > 其它

Map范例

2015-08-16 10:29 260 查看
import java.util.*;

public class TestMap
{
public static void main(String [] args)
{
HashMap<String,Integer>scores=new HashMap<String,Integer>();
scores.put("Kathy",42);
scores.put("Bert",343);
scores.put("Skyler",420);
System.out.println(scores);
System.out.println(scores.get("Bert"));

}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: