码迷,mamicode.com
首页 >  
搜索关键字:equals == 对象比较    ( 4743个结果
xml转化为Map
方法:public static Map changeMap(String xmlDoc) { if (!xmlDoc.equals("") && (xmlDoc != null)) { // 创建一个新的字符串 StringReader xmlString = new StringRead...
分类:其他好文   时间:2015-01-15 10:49:05    阅读次数:184
【Java基础】常用知识积累
1、==和equals的区别 null和""的区别 2、15个顶级Java多线程面试题及回答         (1)、线程中join的使用        在很多情况下,主线程生成并起动了子线程,如果子线程里要进行大量的耗时的运算,主线程往往将于子线程之前结束,但是如果主线程处理完其他的事务后,需要用到子线程的处理结果,也就是主线程需要等待子线程执行完成之后再结束,这个时候就要用到join()...
分类:编程语言   时间:2015-01-14 21:25:47    阅读次数:173
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 ...
分类:其他好文   时间:2015-01-14 16:58:45    阅读次数:167
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 / ...
分类:其他好文   时间:2015-01-14 16:55:08    阅读次数:202
LeetCode112——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...
分类:其他好文   时间:2015-01-13 19:55:05    阅读次数:174
==和equals的区别 null和""的区别
java中的数据类型,可分为两类:  1.基本数据类型,也称原始数据类型。byte,short,char,int,long,float,double,boolean    他们之间的比较,应用双等号(==),比较的是他们的值。  2.复合数据类型(类)    当他们用(==)进行比较的时候,比较的是他们在内存中的存放地址,所以,除非是同一个new出来的对象,他们的比较后的结果为true,否...
分类:其他好文   时间:2015-01-13 12:36:25    阅读次数:150
[C++]LeetCode: 91 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 /...
分类:编程语言   时间:2015-01-12 19:24:15    阅读次数:170
equals()方法左右变量的位置
题:一个变量,一个常量,用equals()方法比较,让咱们,看看到底是常量放前面好啊,还是变量放前面好----------------------------------------------------------------------------------------------其实说白了...
分类:其他好文   时间:2015-01-12 19:06:58    阅读次数:99
[C++]LeetCode: 90 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 a...
分类:编程语言   时间:2015-01-12 16:40:36    阅读次数:221
Java重写equals()和hashCode()
1.何时需要重写equals()当一个类有自己特有的 ”逻辑相等”概念(不同于对象身份的概念)。2.设计equals()[1]使用instanceof操作符检查”实参是否为正确的类型”。[2]对于类中的每一个”关键域”,检查实参中的域与当前对象中对应的域值。 [2.1]对于非float和doubl....
分类:编程语言   时间:2015-01-12 16:00:24    阅读次数:146
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!