码迷,mamicode.com
首页 >  
搜索关键字:hashset hashcode equals    ( 6917个结果
linq查询一个字段的总和
(from s in dc.StockInItem //所要查询单表join si in dc.StockIn //联合的表on s.StockInID equals si.StockInID //两个表联合的相同条件where (s.ColorsID == int.Parse(co...
分类:其他好文   时间:2014-06-28 23:35:53    阅读次数:275
JAVA中equal()和==的区别
一般认为:==比较的是基础数据的值或者是对象的引用地址equal()比较的是对象的内容其实:==和equal()都是比较的引用地址,其实是栈内存中变量(包括基本数据类型的变量和对象变量)的值equals()方法在object类中定义如下:public boolean equals(Object ob...
分类:编程语言   时间:2014-06-28 17:11:04    阅读次数:265
npoi的使用方法
使用NPOI导出Excel代码如下,直接上代码,代码可以直接运行 private static MemoryStream RenderToExcel(DataTable dt) { if (Equals(dt, null)) { ...
分类:其他好文   时间:2014-06-28 12:23:36    阅读次数:282
Java中Map相关的快速查找算法与唯一性(转载)
原文地址:http://blog.csdn.net/chuyuqing/article/details/19629229在对《Set和hashCode()》的一篇原创文章写完后,由于对自己的一些论断产生了模糊和怀疑,因此又对Set进行了一些研究,形成本篇。在Set的使用场景中,我们不外乎看中了她存储...
分类:编程语言   时间:2014-06-24 11:50:33    阅读次数:238
检查或遍历android手机应程
检查android手机中是否存在某应程public boolean checkApp(String packageName) { if (packageName == null || "".equals(packageName)) return false; try { ApplicationInf...
分类:移动开发   时间:2014-06-24 09:16:50    阅读次数:265
【Leetcode】Path Sum
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. For example: Given the below binary tree and sum...
分类:其他好文   时间:2014-06-22 20:59:24    阅读次数:227
【Java编码准则】の #11不要使用Object.equals()来比较密钥值
java.lang.Object.equals()函数默认情况下是不能用来比较组合对象的,例如密钥值。很多Key类没有覆写equals()函数,因此,组合对象的比较必须单独比较里面的各个类型以保证正确性。 [不符合安全要求的代码示例]      下面的代码使用equals()函数比较两个key值,key值即使具有相同的取值也可能会返回不相等,导致结果出错。 private static b...
分类:编程语言   时间:2014-06-22 08:03:23    阅读次数:275
【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-21 22:44:58    阅读次数:266
JAVA运算符
1.&和&&(1).&和&&都可以用作逻辑与的运算符,表示逻辑与(and),当运算符两边的表达式的结果都为true时,整个运算结果才为true.(2).&&还具有短路的功能,即如果第一个表达式为false,则不再计算第二个表达式.例如,对于if(str != null && !str.equals(...
分类:编程语言   时间:2014-06-21 16:24:29    阅读次数:289
百度web部门面试(后端)
显示老一套基本情况,自我介绍,项目描述,承担任务。Java基础:equals,hashcode。map的实现。String,stringBuffer,StringBudder区别。实现方式。Object含有的方法。继承,多态,重载。Servlet是线程安全的么Java两种实现线程的方式,有什么区别。...
分类:Web程序   时间:2014-06-20 15:55:43    阅读次数:238
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!