Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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.


Ïà¹ØÎĵµ£º

Java Web»ù´¡£ºµÚ¶þÊ®¶þ½² Ajax½»»¥¼òµ¥ÊµÀý

±¾ÎÄÄÚÈÝÕª×Ô£º¡¶Java Web¿ª·¢½Ì³Ì——ÈëÃÅÓëÌá¸ßƪ£¨JSP+Servlet£©¡·
ÏÂÃæÒÔ×¢²á¹ý³ÌÖÐÓû§ÃûÊÇ·ñ´æÔÚµÄÑé֤ΪÀý½éÉÜAJAXµÄÓ¦Óá£
¹¦ÄÜÃèÊö£ºÓû§×¢²áµÄÓû§Ãû²»ÔÊÐíÖØ¸´£¬ËùÒÔÔÚÓû§ÌύʱºòÐèÒªÅжϡ£ÎªÁËÈÃÓû§ÔçÖªµÀ½á¹û£¬ÔÚÓû§ÊäÈëÓû§ÃûÖ®ºó¾ÍÓ¦¸Ã½øÐÐÅжϣ¬¿ÉÒÔ²ÉÓÃAJAX½øÐд¦Àí¡£
¼ÙÉ裺ΪÁ˼ò»¯´ú ......

Java»ù´¡£ºµÚÊ®Áù½² ÈÕÆÚºÍʱ¼äµÄʹÓÃ

ÔÚJavaÓ¦ÓÃÖУ¬ÈÕÆÚºÍʱ¼ä×÷Ϊ»ù±¾µÄÐÅÏ¢ÀàÐÍÓ¦ÓõÄÌØ±ð¹ã·º£¬ÀýÈç»ñÈ¡µ±Ç°Ê±¼ä£¬¼ÆËãijЩ²Ù×÷Ö´ÐеÄʱ¼äµÈ¡£ÈÕÆÚ´¦ÀíÏà¹ØµÄÀà°üÀ¨DateºÍCalendar£¬Í¨¹ýDateºÍCalendar¿ÉÒÔ»ñÈ¡µ±Ç°Ê±¼ä£¬¶Ôʱ¼ä½øÐÐһЩÔËË㣬»ñȡʱ¼äÖеÄÄê¡¢Ô¡¢ÈÕ¡¢Ê±¡¢·Ö¡¢ÃëºÍÐÇÆÚµÈÐÅÏ¢¡£ÔÚÊäÈëºÍÊä³öµÄʱºò¾­³£Óõ½×Ö·û´®ÐÎʽµÄʱ¼ä£¬Õâ¾ÍÐèҪʱ¼äºÍ ......

javaѧϰ²½Öè javaѧϰÐĵÃ

ÿ¸öÈ˵Äѧϰ·½·¨ÊDz»Í¬µÄ£¬Ò»¸öÈ˵ķ½·¨²»¼ûµÃÊʺÏÁíÒ»¸öÈË£¬ÎÒÖ»ÄÜÊÇ̸×Ô¼ºµÄѧϰ·½·¨¡£ÒòΪÎÒѧϰJavaÊÇÍêÈ«×ÔѧµÄ£¬´ÓÀ´Ã»ÓÐÎʹý±ðÈË£¬ËùÒÔѧϰµÄ¹ý³Ì»ù±¾ÉÏÍêÈ«ÊÇ×Ô¼ºÃþË÷³öÀ´µÄ¡£ÎÒÒ²²»ÖªµÀÕâÖÖ·½·¨ÊÇ·ñÊDZȽϺõķ½·¨£¬Ö»Äܸø´ó¼ÒÌṩһµã²Î¿¼ÁË¡£
ѧϰJavaµÄµÚÒ»²½Êǰ²×°ºÃJDK£¬Ð´Ò»¸öHello World£¬ ÆäʵJ ......

JAVA¹æ·¶Ñ§Ï°——Òì³£

JAVAÒì³£¿ÉÒÔ·ÖΪÈýÖÖ£º
1.checked Òì³£
   ±àÒëÆ÷±£Ö¤ËùÓеÄcheckedÒì³£¶¼»áµÃµ½´¦Àí£¬ÕâÑù¾Í¿ÉÒÔÔÚ±àÒëÆÚ¼ì²éÒì³£´¦Àí¡£Í¨³£×Ô¶¨ÒåµÄÒì³£Ó¦¸ÃΪ´ËÀàÐÍ
2.runtimeÒì³£
   ÊÇJVMÔÚ³ÌÐòÔËÐÐÆÚ·¢ÏÖµÄÎÞЧ²Ù×÷£¬ÀýÈçNullPointerException
3.Errors
   ÓÉJVM¼ì²âµ½µÄʧ°Ü²Ù×÷£¬ÀýÈçOutOfMe ......

ΪʲôJAVAҪʹÓõ¥¼Ì³ÐÌåϵ

´ó¼Ò¶¼ÖªµÀJAVAÖÐʹÓÃOBJECT×÷ΪΨһµÄ»ùÀà¡£µ«ÊÇJAVAµÄÉè¼ÆÕßΪʲôҪÕâÑù×öÄØ£¿ÖضÁ¡¶TTHINKING IN JAVA¡·£¬µÃ³öÒÔÏÂÔ­Òò£º
1£¬JAVAÊÇ´¿ÃæÏò¶ÔÏóµÄÓïÑÔ¡£µ¥¼Ì³ÐÌåϵ±£Ö¤ÁËËùÓÐн¨µÄ»òJDKÖÐÒÑÓеÄÀà¶¼±ØÐë¼Ì³Ð×ÔOBJECT¡£ÕâÑù£¬±£Ö¤ÁËËùÓеÄÀà¶¼¾ßÓÐһЩ»ù±¾µÄ·½·¨¡£ÀýÈçÒ»¸öString¶ÔÏóÓÐtoString()·½·¨£¬ÁíÍâÒ»¸öMath¶ÔÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ