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

javaÖÐequalsºÍ==µÄÇø±ð


ÖµÀàÐÍÊÇ´æ´¢ÔÚÄÚ´æÖеĶÑÕ»£¨ÒÔºó¼ò³ÆÕ»£©£¬¶øÒýÓÃÀàÐ͵ıäÁ¿ÔÚÕ»Öнö½öÊÇ´æ´¢ÒýÓÃÀàÐͱäÁ¿µÄµØÖ·£¬¶øÆä±¾ÉíÔò´æ´¢ÔÚ¶ÑÖС£
==²Ù×÷±È½ÏµÄÊÇÁ½¸ö±äÁ¿µÄÖµÊÇ·ñÏàµÈ£¬¶ÔÓÚÒýÓÃÐͱäÁ¿±íʾµÄÊÇÁ½¸ö±äÁ¿ÔÚ¶ÑÖд洢µÄµØÖ·ÊÇ·ñÏàͬ£¬¼´Õ»ÖеÄÄÚÈÝÊÇ·ñÏàͬ¡£
equals²Ù×÷±íʾµÄÁ½¸ö±äÁ¿ÊÇ·ñÊǶÔͬһ¸ö¶ÔÏóµÄÒýÓ㬼´¶ÑÖеÄÄÚÈÝÊÇ·ñÏàͬ¡£
==±È½ÏµÄÊÇ2¸ö¶ÔÏóµÄµØÖ·£¬¶øequals±È½ÏµÄÊÇ2¸ö¶ÔÏóµÄÄÚÈÝ¡£
ÏÔÈ»£¬µ±equalsΪtrueʱ£¬==²»Ò»¶¨Îªtrue£»
Ò»¡¢StringÖеÄequalsºÍ==
1¡¢
public class TestString {
     public static void main(String[] args) {
         String s1 = "Monday";
         String s2 = "Monday";
     }
}
ÉÏÃæÕâ¶Î³ÌÐòÖУ¬µ½µ×Óм¸¸ö¶ÔÏóÄØ£¿
À´¼ì²âһϰɣ¬ÉÔ΢¸Ä¶¯Ò»Ï³ÌÐò
public class TestString {
     public static void main(String[] args) {
         String s1 = "Monday";
         String s2 = "Monday";
         if (s1 == s2)
             System.out.println("s1 == s2");
         else
             System.out.println("s1 != s2");
     }
}
±àÒë²¢ÔËÐгÌÐò£¬Êä³ö£ºs1 == s2
˵Ã÷£ºs1 Óë s2 ÒýÓÃͬһ¸ö String ¶ÔÏó -- "Monday"!
2.
ÔÙÉÔ΢¸Ä¶¯Ò»Ï³ÌÐò£¬»áÓиüÆæ¹ÖµÄ·¢ÏÖ£º
public class TestString {
     public static void main(String[] args) {
         String s1 = "Monday";
         String s2 = new String("Monday");
         if (s1 == s2)
             System.out.println("s1 == s2");
         else
   &


Ïà¹ØÎĵµ£º

JavaÈÕÆÚÀà³£Ó÷½·¨

1.½«ÈÕÆÚ´æÈëDate¶ÔÏó
SimpleDateFormatÊÇÒ»¸öÈÕÆÚ¸ñʽ»¯Àà¡£yyyy£¬MM£¬dd£¬HH£¬mm,ss,SSS·Ö±ð±íʾÄ꣬Ô£¬ÈÕ£¬Ê±£¬·Ö£¬Ã룬ºÁÃë¡£¿ÉÒÔ½«ËûÃÇËæÒâ×éºÏ£¬¹¹½¨×Ô¼ºµÄÈÕÆÚ¸ñʽ¡£
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
È»ºóÖ»ÐèÒª½«·ûºÏÈÕÆÚ¸ñʽµÄÈÕÆÚ×Ö·û´®´æÈëDate¶ÔÏóÖС£
......

JAVA ÖеÄIOÁ÷


À´Ô´£ºhttp://cj1240.zhmy.com/archives/2008/148832.html
JAVA ÖеÄIOÁ÷
Ò»¡¢Á÷µÄ¸ÅÄî
       Á÷(stream)µÄ¸ÅÄîÔ´ÓÚUNIXÖйܵÀ(pipe)µÄ¸ÅÄî¡£ÔÚUNIXÖУ¬¹ÜµÀÊÇÒ»Ìõ²»¼ä¶ÏµÄ×Ö½ÚÁ÷£¬ÓÃÀ´ÊµÏÖ³ÌÐò»ò½ø³Ì¼äµÄͨÐÅ£¬»ò¶ÁдÍâΧÉ豸¡¢ÍⲿÎļþµÈ¡£
     &nb ......

JavaÔõÑùÖжÏÒ»¸öÔËÐÐÖеÄÏß³Ì

¹Ø¼ü×Ö: thread


³ÌÐòÊǺܼòÒ׵ġ£È»¶ø£¬ÔÚ±à³ÌÈËÔ±ÃæÇ°£¬¶àÏ̳߳ÊÏÖ³öÁËÒ»×éеÄÄÑÌ⣬Èç¹ûûÓб»Ç¡µ±µÄ½â¾ö£¬½«µ¼ÖÂÒâÍâµÄÐÐΪÒÔ¼°Ï¸Î¢µÄ¡¢ÄÑÒÔ·¢ÏֵĴíÎó¡£
ÔÚ±¾ÆªÎÄÕÂÖУ¬ÎÒÃÇÕë¶ÔÕâЩÄÑÌâÖ®Ò»£ºÈçºÎÖжÏÒ»¸öÕýÔÚÔËÐеÄÏ̡߳£
Öжϣ¨Interrupt£©Ò»¸öÏß³ÌÒâζ×ÅÔÚ¸ÃÏß³ÌÍê³ÉÈÎÎñ֮ǰֹͣÆäÕýÔÚ½øÐеÄÒ»ÇУ ......

ÔÚLinuxϵÄJava»·¾³ÉèÖÃ

Ò».ÏÂÔØJDK
1.µÇ¼SunµÄJDK¹Ù·½ÏÂÔØÍøÖ·:http://java.sun.com/javase/downloads/index.jsp
2.ÏÂÔØjdk-1_5_0_07-linux-i586-rpm.binÎļþ
 
¶þ.°²×°JDK
1.Ôö¼Ójdk-1_5_0_07-linux-i586-rpm.binÎļþµÄ¿ÉÖ´ÐÐȨÏÞ
#root> chmod 755 jdk-1_5_0_07-linux-i586-rpm.bin
2.Ö´ÐÐjdk-1_5_0_07-linux-i586-rpm.bin
#ro ......

JAVAÖзÀÖ¹SQL×¢Èë¹¥»÷ÀàµÄÔ´´úÂë

package cn.com.hbivt.util;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class StringUtils {
//¹ýÂËͨ¹ýÒ³Ãæ±íµ¥Ìá½» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ