Java equals
boolean java.lang.Object.equals(Object obj)
Indicates whether some other
object is "equal to" this one.
The equals method implements an
equivalence relation on non-null object references:
It is reflexive: for
any non-null reference value x, x.equals(x) should return true.
It is
symmetric: for any non-null reference values x and y, x.equals(y) should return
true if and only if y.equals(x) returns true.
It is transitive: for any
non-null reference values x, y, and z, if x.equals(y) returns true and
y.equals(z) returns true, then x.equals(z) should return true.
It is
consistent: for any non-null reference values x and y, multiple invocations of
x.equals(y) consistently return true or consistently return false, provided no
information used in equals comparisons on the objects is modified.
For any
non-null reference value x, x.equals(null) should return false.
The equals
method for class Object implements the most discriminating possible equivalence
relation on objects; that is, for any non-null reference values x and y, this
method returns true if and only if x and y refer to the same object (x == y has
the value true).
Note that it is generally
necessary to override the hashCode method whenever this method is overridden, so
as to maintain the general contract for the hashCode method, which states that
equal objects must have equal hash codes
.
See
Also:
hashCode()
java.util.Hashtable
Parameters:
obj the
reference object with which to compare.
Returns:
true if this object is
the same as the obj argument; false otherwise.
相关文档:
Java 理论与实践: 描绘线程安全性
2007-12-15 00:10
——线程安全不是一个非真即假的命题
Brian Goetz (brian@quiotix.com), 首席顾问, Quiotix Corp
2003 年 11 月 15 日
7月份我们的并发专家 Brian Goetz 将 Hashtable 和 Vector 类描述为“有条件线程安全的”。一个类难道不是线程安全就是线程 ......
eclipse
菜单 -> Window -> Preferences, 打开Preferences窗口,然后依次选择 Java -> JadClipse,确保"Path to decompiler:"的值为"jad.exe"。
http://hi.baidu.com/darmn/blog/item/56678e7f14f81a0129388af7.html
http://hi.baidu.com/zhangge9477/blog/item/adeced08c9663a3ae8248849. ......
这个框架也是为google app engine准备的。当时感觉直接在gae上sevlet太烦人了,就封装个简易的框架。使用的时候只需要配置web.xml中DispacherSevlet和package.properties中的package.path(默认扫描的包)即可
gae例子:http://orzblogs.appspot.com/Home.htm
大学的时候很BS java,学了之后就扔掉了,现在工作了才开始 ......
软件开发基础
计算机是执行程序指令的电子设备,输入、输出、存储和处理
CPU部件:算术逻辑单元(ALU),控制单元
存储器:主存储器(临时存储数据),辅助存储器(永久存储)
  ......
学习java也有一些时间了,但是对java里的数据类型传递方法还是不甚了解
以下是我在jre1.6.0_04 运行环境 上对java 数据内型传递方式的探索
感觉收获还是彼多,因为出现了我遇料之外的结果。
一、基本数据类型:
基本类型为值传递,基本类型中的数组为引用传递;
探索代码如下:
package cn.cn;
public ......