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´úÀí
Rational RobotÊÇͨ¹ý¼ÖÆÓû§²Ù×÷½øÐй¦ÄÜ£¬ÐÔÄܺͼæÈÝÐÔ²âÊÔµÄ×Ô¶¯»¯²âÊÔ¹¤¾ß¡£Í¨¹ý»Ø·Å¼Öƽű¾½øÐй¦ÄܺͿɿ¿ÐÔ²âÊÔ¡£±¾ÎÄÖ÷Òª½éÉÜRational RobotÕë¶Ôjava³ÌÐòºÍappletsÈçºÎ½øÐй¦ÄܲâÊÔ¡£
Rational Robotµ±Ç°°æ±¾Ö§³ÖÓÃÒÔÏÂÀà¿â¿ª·¢µÄJava³ÌÐòºÍapplet³ÌÐò£º
lJava Foundation Classes(JFCs)
l ......
±¾ÎÄÄÚÈÝÕª×Ô£º¡¶Java Web¿ª·¢½Ì³Ì——ÈëÃÅÓëÌá¸ßƪ£¨JSP+Servlet£©¡·
ÏÂÃæÒÔ×¢²á¹ý³ÌÖÐÓû§ÃûÊÇ·ñ´æÔÚµÄÑé֤ΪÀý½éÉÜAJAXµÄÓ¦Óá£
¹¦ÄÜÃèÊö£ºÓû§×¢²áµÄÓû§Ãû²»ÔÊÐíÖظ´£¬ËùÒÔÔÚÓû§ÌύʱºòÐèÒªÅжϡ£ÎªÁËÈÃÓû§ÔçÖªµÀ½á¹û£¬ÔÚÓû§ÊäÈëÓû§ÃûÖ®ºó¾ÍÓ¦¸Ã½øÐÐÅжϣ¬¿ÉÒÔ²ÉÓÃAJAX½øÐд¦Àí¡£
¼ÙÉ裺ΪÁ˼ò»¯´ú ......
±¾ÎÄÄÚÈÝÕª×Ô£º¡¶Java Web¿ª·¢½Ì³Ì——ÈëÃÅÓëÌá¸ßƪ£¨JSP+Servlet£©¡·
AJAXÊÇAsynchronous JavaScript and XMLµÄËõд£¬Éæ¼°JavaScript½Å±¾¡¢XHTMLºÍCSS¡¢DOM¡¢XMLºÍXSTLµÈ¼¼Êõ¡£
l XHTMLÓëCSSʵÏÖÊý¾ÝÐÅÏ¢µÄͳһ»¯ºÍ±ê×¼»¯ÏÔʾ£»
l & ......
֮ǰÔÚ×öfindbugsµÄʱºò¾³£»á²é¿´×Ö½ÚÂ룬¶¼ÊÇÒ»Öª°ë½âµÄ
ÄÇÌì¿´µ½Ò»¸öÎÊÌ⣬¸ÕºÃ¿ÉÒÔ´Ó×Ö½ÚÂëÀ´½âÊÍ
ÕâЩÌâÄ¿³£¼ûÓÚÃæÊÔÌ⣬ͨ³£ÒªÊÇ˸ÒÕâôд´úÂ룬ÍêÈ«ÊÇÔÚÕÒËÀ¡£¡£
Java´úÂë
public class Test {
public static void main(String[]  ......
ÖÚËùÖÜÖª£¬ÔÚ³ÌÐò¿ª·¢ÖУ¬ÄÑÃâ»áÓöµ½ÐèҪƥÅä¡¢²éÕÒ¡¢Ìæ»»¡¢ÅжÏ×Ö·û´®µÄÇé¿ö·¢Éú£¬¶øÕâЩÇé¿öÓÐʱÓֱȽϸ´ÔÓ£¬Èç¹ûÓô¿±àÂ뷽ʽ½â¾ö£¬ÍùÍù»áÀ˷ѳÌÐòÔ±µÄʱ¼ä¼°¾«Á¦¡£Òò´Ë£¬Ñ§Ï°¼°Ê¹ÓÃÕýÔò±í´ïʽ£¬±ã³ÉÁ˽â¾öÕâһì¶ÜµÄÖ÷ÒªÊֶΡ£
´ó¼Ò¶¼ÖªµÀ£¬ÕýÔò±í´ïʽÊÇÒ»ÖÖ¿ÉÒÔÓÃÓÚģʽƥÅäºÍÌæ»»µÄ¹æ·¶£¬Ò»¸öÕýÔò±í´ïʽ ......