码迷,mamicode.com
首页 >  
搜索关键字:hashset hashcode equals    ( 6917个结果
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
Problem Path Sum II
Problem Description:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.Solution: 递归。 1 public List>...
分类:其他好文   时间:2014-07-07 16:59:12    阅读次数:169
HashSet中实现不插入重复的元素
/*看一下部分的HashSet源码....public class HashSet extends AbstractSet implements Set, Cloneable, java.io.Serializable{ static final long serialVersio...
分类:其他好文   时间:2014-07-07 15:23:29    阅读次数:253
JAVA中 String 、StringBuffer和StringBuilder 的区别
String 内容定义成 final char[],只能在属性和构造函数中赋值,其它地方不能改变 ;String 覆盖实现了 equals 。StringBuffer 内容定义成了 char[] ,但没实现 equals。String 和 StringBuffer 的区别是:1、String 通过构...
分类:编程语言   时间:2014-07-01 23:32:09    阅读次数:266
Swift学习——Swift基础详解(五)
上回书说道:灰常灰常基本的数据类型 下面咱们来点高级的: Tuples    元组 元组存储一对键值,并且没有类型限制 let http404Error = (404, "Not Found") // http404Error is of type (Int, String), and equals (404, "Not Found")书上废话一堆,反正元组就是这么写,上面的例子还...
分类:其他好文   时间:2014-07-01 06:55:09    阅读次数:236
java中如何实现一个优美的equals方法
java中如何实现一个优美的equals方法
分类:编程语言   时间:2014-06-29 19:30:28    阅读次数:197
hashCode相关性能优化
hashCode相关性能优化...
分类:其他好文   时间:2014-06-28 08:44:05    阅读次数:226
LeetCode——Path Sum II
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree and sum = 22, 5 / ...
分类:其他好文   时间:2014-06-28 07:31:28    阅读次数:214
Java equals和toString用法
1、代码       User.java public class User{ String name; int age; public User(String name,int age){ this.name = name; this.age = age; } public boolean equals(Object obj){ if(this == ...
分类:编程语言   时间:2014-06-27 09:29:17    阅读次数:261
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!