码迷,mamicode.com
首页 >  
搜索关键字:hashset hashcode equals    ( 6917个结果
java集合的操作
集合的操作Iterator、Collection、Set和HashSet关系Iterator set=new HashSet(); //向集合中添加元素 set.add("a"); set.add("b"); set.add("c"); set.add("a");//集合中的元素是不重复的...
分类:编程语言   时间:2014-12-16 20:40:11    阅读次数:136
完善:网上的手机号和车牌号的正则表达式
现在一搜手机号正则和车牌号正则,都是以前写的 现在手机号更新了177的,147的等等 所以,手机号正则可完善一下: public static boolean checkmobilePhone(String mobilePhone){ return (mobilePhone==null || mobilePhone.equals("") || !mobilePh...
分类:移动开发   时间:2014-12-16 17:12:44    阅读次数:131
String.subString的用法
在做项目的时候,碰到一个过滤字符串的问题,因为一直无法正常的描述完整这个字符串的信息,所以想到截取部分差异化的字符来解决这个问题 String,substrinf(start,end); 这个函数的使用的时候,可以很方便的截取到你想的的部分字符串 再结合String.equals();来做一个比较,就可以很轻松的过滤掉含有这类字符串的信息了 例如: String text = "Mob...
分类:其他好文   时间:2014-12-16 15:08:01    阅读次数:171
拼接sql
String whereArgs = taskTable + " where 1=1 "; if (upCheck) { whereArgs += " and type = 2 "; } if (gameID != null && !gameID.equals("0")) { where...
分类:数据库   时间:2014-12-16 14:56:16    阅读次数:151
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 andsum =...
分类:其他好文   时间:2014-12-16 00:50:14    阅读次数:223
Android 判断debug签名和release签名
判断debug签名和release签名思路是:可以获取到package里的签名信息Signature对象,在Signature对象里有hashCode()方法,可以用来标识Signature对象。目前我采用的方法是先运行release版的app,然后记录下该包里Signature对象的hashcod...
分类:移动开发   时间:2014-12-15 15:20:16    阅读次数:176
bai_java 集合
java集合l Java集合框架l Collection接口APIl Iterator迭代器接口(遍历集合中的元素)l Collection子接口之一:Set接口Ø HashSet LinkedHashSet TreeSetl Collection子接口之二: List接口Ø ArrayList L...
分类:编程语言   时间:2014-12-14 19:51:00    阅读次数:401
Java中Map与HashMap,Hashtable,HashSet的区别
HashMap和Hashtable两个类都实现了Map接口,二者保存K-V对(key-value对);HashSet则实现了Set接口,性质类似于集合。HashTable和HashMap区别一、继承的父类不同Hashtable继承自Dictionary类,而HashMap继承自AbstractMap类。但二者都实现了Map接口。二、线程安全性不同Hashtable 中的方法是Synchronize...
分类:编程语言   时间:2014-12-14 15:54:05    阅读次数:189
Path Sum
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/41910495 Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. 思路: (1)题意为给定一个(每个节点带有数值)二叉...
分类:其他好文   时间:2014-12-13 18:04:21    阅读次数:176
Java SE 基础知识(String,Array)
String 类:1. 对于String对象的相等性判断来说,请使用equals()方法,而不是==。String的equals()是判断当前字符串与传进来的字符串的内容是否一致。2. String是常量,其对象一旦创建完毕就无法改变。当使用+拼接字符串时,会生成新的String对象,而不是向原有的...
分类:编程语言   时间:2014-12-13 17:47:20    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!