易截截图软件、单文件、免安装、纯绿色、仅160KB

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.


相关文档:

用Robot写Java代理

用Robot写Java代理
Rational Robot是通过录制用户操作进行功能,性能和兼容性测试的自动化测试工具。通过回放录制脚本进行功能和可靠性测试。本文主要介绍Rational Robot针对java程序和applets如何进行功能测试。
Rational Robot当前版本支持用以下类库开发的Java程序和applet程序:
lJava Foundation Classes(JFCs)
l ......

Java Web基础:第二十讲 Ajax概述

本文内容摘自:《Java Web开发教程——入门与提高篇(JSP+Servlet)》
AJAX是Asynchronous JavaScript and XML的缩写,涉及JavaScript脚本、XHTML和CSS、DOM、XML和XSTL等技术。
l         XHTML与CSS实现数据信息的统一化和标准化显示;
l    & ......

Java基础:第十六讲 日期和时间的使用

在Java应用中,日期和时间作为基本的信息类型应用的特别广泛,例如获取当前时间,计算某些操作执行的时间等。日期处理相关的类包括Date和Calendar,通过Date和Calendar可以获取当前时间,对时间进行一些运算,获取时间中的年、月、日、时、分、秒和星期等信息。在输入和输出的时候经常用到字符串形式的时间,这就需要时间和 ......

java数据结构之队列

在使用队列中,我们一般都会使用循环队列以保证性能
package com.yz.myqueue;
public class Queue {
private Integer size;
private Integer front;
private Integer rear;
private Object[] datas;
public Queue(int size){
this.size=size;
this.front=-1;
this.rear=-1;
datas=new Object[size] ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号