码迷,mamicode.com
首页 >  
搜索关键字:hashmap hashset    ( 7972个结果
Map,list,set,集合转化
public class TestDemo { public static void main(String[] args) { // set 转list List list = new ArrayList(new HashSet()); // list 转set Set set = new...
分类:其他好文   时间:2014-07-16 23:09:55    阅读次数:188
Collection框架
Collection框架集合框架(Collection Framework)泛指java.util包的若干个类和接口.如Collection,List,ArrayList,LinkedList,Vector(自动增长数组),HashSet,HashMap等.集合框架中的类主要封装的是典型的数据结构,...
分类:其他好文   时间:2014-07-10 11:29:24    阅读次数:249
【项目实例】android开发游戏音效代码实例
//音效的音量 int streamVolume; //定义SoundPool 对象 private SoundPool soundPool; //定义HASH表 private HashMap soundPoolMap; /*****************************...
分类:移动开发   时间:2014-07-10 00:26:34    阅读次数:222
HashSet中实现不插入重复的元素
/*看一下部分的HashSet源码....public class HashSet extends AbstractSet implements Set, Cloneable, java.io.Serializable{ static final long serialVersio...
分类:其他好文   时间:2014-07-07 15:23:29    阅读次数:253
HashMap和Hashtable的区别
HashMap 是Hashtable 的轻量级实现(非线程安全的实现),他们都完成了Map 接口,主要区别在于HashMap 允许空(null)键值(key),由于非线程安全,在只有一个线程访问的情况下,效率要高于Hashtable。HashMap 允许将null 作为一个entry 的key 或者...
分类:其他好文   时间:2014-07-01 22:44:17    阅读次数:344
java 常用的几个技巧
1. Map概览Java SE中有四种常见的Map实现——HashMap, TreeMap, Hashtable和LinkedHashMap。如果我们使用一句话来分别概括它们的特点,就是:HashMap就是一张hash表,键和值都没有排序。TreeMap以红-黑树结构为基础,键值按顺序排列。Link...
分类:编程语言   时间:2014-07-01 20:58:11    阅读次数:371
Android第六期 - ViewPage与菜单栏本地页面监听滑动效果
首先是JiaoyuzixunActivity.java代码部分:packagecom.gaoxiaotong.ctone.jiaoyuzixun; importjava.util.ArrayList; importjava.util.HashMap; importjava.util.Iterator; importjava.util.List; importjava.util.Map; importorg.json.JSONArray; importorg.json.JSONObject;..
分类:移动开发   时间:2014-06-30 15:57:01    阅读次数:505
Leetcode-Two Sum
题目: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the ta...
分类:其他好文   时间:2014-06-28 08:17:11    阅读次数:305
m2014-c->c模拟java的hashmap容器类
转自:http://bbs.csdn.net/topics/390034346在java中像ArrayList,HashMap都是现成的,在java.util包中,用的时候直接importjava.util.*就行了。前几天写了一c版的ArrayList,同时欢迎大家指出问题:http://topi...
分类:编程语言   时间:2014-06-27 22:26:28    阅读次数:559
freemarker写select组件报错总结(七)
1、错误描述 六月 26, 2014 11:26:27 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template processing error: "Expected collection or sequence. datas evaluated instead to freemarker.core.HashLite...
分类:其他好文   时间:2014-06-27 10:01:02    阅读次数:223
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!