Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaÖеÄ==ºÍequalsÇø±ð


ÒýÑÔ£º´ÓÒ»¸öÅóÓѵÄblogת¹ýÀ´µÄ£¬ÀïÃæ½â¾öÁËÁ½¸öÀ§ÈÅÎҺܾõÄÎÊÌâ¡£ºÜÓоúµ·ê¸ÊÁصĸоõ¡£
ÖÐÈí¹ú¼Êµç×ÓÕþÎñ²¿Jeff Chi×ܽᣬתÔØÇë˵Ã÷³ö´¦¡£
¸ÅÊö£º
       A.==¿ÉÓÃÓÚ»ù±¾ÀàÐͺÍÒýÓÃÀàÐÍ£ºµ±ÓÃÓÚ»ù±¾ÀàÐÍʱºò£¬ÊDZȽÏÖµÊÇ·ñÏàͬ£»µ±ÓÃÓÚÒýÓÃÀàÐ͵Äʱºò£¬ÊDZȽ϶ÔÏóÊÇ·ñÏàͬ¡£
       B.¶ÔÓÚString a = “a”; Integer b = 1;ÕâÖÖÀàÐ͵ÄÌØÓжÔÏó´´½¨·½Ê½£¬==µÄʱºòÖµÊÇÏàͬµÄ¡£
       C.»ù±¾ÀàÐÍûÓÐequals·½·¨£¬equalsÖ»±È½ÏÖµ£¨¶ÔÏóÖеÄÄÚÈÝ£©ÊÇ·ñÏàͬ£¨Ïàͬ·µ»Øtrue£©¡£
       D.Ò»¸öÀàÈç¹ûûÓж¨Òåequals·½·¨£¬Ëü½«Ä¬Èϼ̳ÐObjectÖеÄequals·½·¨£¬·µ»ØÖµÓë==·½·¨Ïàͬ¡£
ÏêÊö£º
       ¢Ù==ºÍequalsµÄʵÖÊ¡£
       ÔÚJAVAÖÐÀûÓÃ"=="±È½Ï±äÁ¿Ê±,ϵͳʹÓñäÁ¿ÔÚ"Õ»"ÖÐËù´æµÄÖµ×÷Ϊ±È½ÏµÄÒÀ¾Ý¡£
       »ù±¾Êý¾ÝÀàÐÍÔÚ"Õ»"ÖдæµÄÊÇÆäÄÚÈÝÖµ,¶ø¶ÔÏóÀàÐÍÔÚ"Õ»"ÖдæµÄÊǵØÖ·,ÕâЩµØÖ·Ö¸Ïò"¶Ñ"ÖеĶÔÏó¡£
       java.lang°üÖеÄObjectÀàÓÐpublic boolean equals(Object obj)·½·¨,Ëü±È½ÏÁ½¸ö¶ÔÏóÊÇ·ñÏàµÈ¡£
       ÆäËü¶ÔÏóµÄequals·½·¨½öµ±±»±È½ÏµÄÁ½¸öÒýÓÃÖ¸ÏòµÄ¶ÔÏóÄÚÈÝÏàͬʱ,¶ÔÏóµÄequals()·½·¨·µ»Øtrue¡£
       ×ÜÖ®,"=="ºÍ"!="±È½ÏµÄÊǵØÖ·.Ò²¿ÉÈÏΪ"=="ºÍ"!="±È½ÏµÄÊǶÔÏó¾ä±ú;¶øequals()±È½ÏµÄÊǶÔÏóÄÚÈÝ.»òÕß˵,,"=="ºÍ"!="±È½ÏµÄÊÇ"Õ»"ÖеÄÄÚÈÝ,¶øequals()±È½ÏµÄÊÇ"¶Ñ"ÖеÄÄÚÈÝ.
       ¢Ú==²Ù×÷·û¡£×¨ÃÅÓÃÀ´±È½ÏÁ½¸ö±äÁ¿µÄÖµÊÇ·ñÏàµÈ£¬Ò²¾ÍÊÇÓÃÓڱȽϱäÁ¿Ëù¶ÔÓ¦µÄÄÚ´æÖÐËù´æ´¢µÄÊýÖµÊÇ·ñÏàͬ£¬Òª±È½ÏÁ½¸ö»ù±¾ÀàÐ͵ÄÊý¾Ý»òÁ½¸öÒýÓñäÁ¿ÊÇ·ñÏ൱£¬Ö»ÄÜÓÃ==²Ù×÷·û¡£
      JavaµÄ»ù±¾Êý¾ÝÀàÐÍΪ(char£¬byte£¬short£¬int£¬long£¬float£¬double£¬boolean)¡£
      Èç¹ûÒ»¸ö±äÁ¿Ö¸ÏòµÄÊý¾ÝÊǶÔÏóÀàÐ͵ģ¬ÄÇô£¬ÕâʱºòÉæ¼°ÁËÁ½¿éÄڴ棬¶ÔÏó±¾ÉíÕ¼ÓÃÒ»¿éÄÚ´æ(¶ÔÄÚ´æ)£¬±äÁ¿±¾ÉíÒ²Õ¼ÓÃÒ»¿éÄڴ棬ÀýÈçObject obj = new Object()±äÁ¿objÊÇÒ»¸öÄڴ棬new Object()ÊÇÒ»¸öÄڴ棬´Ëʱ£¬±äÁ¿Ëù¶ÔÓ¦µÄÄÚ´æÖд洢µÄÊý¾Ý¾


Ïà¹ØÎĵµ£º

java ×Ö·û´®·Ö¸î

¡ñÀûÓÃsplitº¯Êý£º String s = new String("2_8_7_4_3_9_1"); String[] arr = s.split("_"); JavaÖÐÓÃsplitº¯Êý½øÐзָî×Ö·û´®¡£ 1.Óï·¨ÈçÏ String.split(sourceStr,maxSplit) String.split(sourceStr) ²ÎÊý˵Ã÷£ºsourceStrÊDZ»·Ö¸îµÄ×Ö·û´®£¬maxSplitÊÇ×î´óµÄ·Ö¸îÊý ·µ»Øֵ˵Ã÷£ºsplitº¯ÊýµÄ·µ»ØÖµÊÇÒ»¸ö×Ö ......

~java~ÓÃÈ˵¥Î»µÄӦƸҪÇó~

1¡¢Á½Äê¼°ÒÔÉÏJ2EEʵ¼Ê¿ª·¢¾­Ñé
2¡¢ÊìϤJAVA WEB¿ª·¢£¬°üÀ¨JAVASCRIPT¡¢JSP¡¢SERVLET¡¢WEBSERVICE¡¢PORTLETµÈ£»
3¡¢ÊìϤ³£Óÿò¼Ü(È磺 STRUTS2/SPRING/HIBERNATE/IBATISµÈ)£»
4¡¢ÖÁÉÙÊìϤһÖÖÖ÷Á÷¹ØϵÊý¾Ý¿âϵͳ£¬ÀýÈçORACLE¡¢MYSQL¡¢MSSQLµÈ
 
1.ÊìÁ·ÕÆÎÕJava¡¢HTML¡¢JavaScriptµÈÓïÑÔ£»
2.ÊìÁ·ÕÆÎÕJSP/Ser ......

java ¹þ·òÂü±àÂë·´±àÂëµÄʵÏÖ

 //¹þ¸¥Âü±àÂëµÄʵÏÖÀà
public class HffmanCoding {
private int charsAndWeight[][];// [][0]ÊÇ ×Ö·û£¬[][1]´æ·ÅµÄÊÇ×Ö·ûµÄȨֵ£¨´ÎÊý£©
private int hfmcoding[][];// ´æ·Å¹þ¸¥ÂüÊ÷
private int i = 0;// Ñ­»·±äÁ¿
private String hcs[];
public HffmanCoding(int[][] chars) {
// TODO ¹¹Ôì·½·¨
......

JAVAÓëXML_¶ÁÊé±Ê¼Ç_2010 05 14

JAVATMÓëXML 2010-05-14
Ò»¡¢¸ÅÄî
l  ÈκÎXMLÎĵµ¶ÔÈκÎÀàÐ͵ÄÓ¦ÓÃÒÔ¼°ÕýÈ·µÄ½âÎö¶¼±ØÐë¾ßÓÐÁ¼ºÃµÄ½á¹¹well-formed
l  XMLÎĵµ¿ÉÒÔÊÇÓÐЧµØ£¨valid£©£¬µ«²¢·ÇÒ»¶¨ÒªÇóÓÐЧ¡£
l  PI£¨processing instruction£©¸ñʽ£º<?target instructions?>¡£XMLÖеĴ¦ÀíÖ¸ÁîÖ»ÄÜÊǽâÎöÆ÷¿ÉÒÔʶ±ðµÄXML±ê×¼´¦ÀíÃüÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ