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")); } }
相关文章推荐
- 先停下来,看看策划的数值搭建---战斗系统外传
- 径向基网络对蝴蝶花分类
- JVM-java内存管理(1)
- Solr5.2.1学习笔记-1-入门
- 窥探Swift之新添数据类型元组与可选值
- linux配置ssh互信
- 关系运算
- 100个常用的Linux命令
- Valid Anagram
- 分布式存储引擎
- 在java项目中如何利用Dom4j解析XML文件获取数据
- [LeetCode] Minimum Size Subarray Sum
- VI使用总结
- class.getSuper() 方法
- Bitwise AND of Numbers Range
- Win10 Edge浏览器下博客园编辑器无限崩溃
- 用jquery实现小火箭到页面顶部的效果
- Kth Largest Element in an Array
- Objective-C葵花宝典第一重(内功篇)--类与对象
- swtich/if...else的替代语句