Java ³ÌÐòÄÚ´æ·ÖÎö
java³ÌÐòÄÚ´æÖ÷Òª·ÖΪÁË2¸ö²¿·Ö£¬°üÀ¨ stack segment(Õ»ÄÚ´æ)¡¢heap segment(¶ÑÄÚ´æ)¡£
ÔÚ·ÖÎöJava³ÌÐòÄÚ´æ·ÖÅäÇé¿öʱ£¬ÎÒÃÇ´ÓÏÂÃæÕâ¸ö¾³£±»Ê¹ÓõÄÀý×Ó¿ªÊ¼°É¡£
ÏÂÃæ³ÌÐò½«´òӡʲôÄØ£¿
Java´úÂë
String s1 = new String("abc");
String s2 = new String("abc");
System.out.print(s1.equals(s2)); // 1
System.out.print(s1 == s2); // 2
String s1 = new String("abc");
String s2 = new String("abc");
System.out.print(s1.equals(s2)); // 1
System.out.print(s1 == s2); // 2
¿ÉÄÜ´ó¼ÒÐÄÖÐÒѾÓдð°¸ÁË£¬µÚ1ÌõÓï¾ä´òÓ¡µÄÊÇtrue£¬µÚ¶þÌõÓï¾ä´òÓ¡µÄfalse£¬Ã»´í£¬ÕýÈç´ó¼ÒËùÏ룬´òÓ¡½á¹û¾ÍÊÇÕâÑù¡£ÄÇô£¬´ó¼ÒÊÇ·ñÖªµÀΪʲôµÚ2ÌõÓï¾ä´òÓ¡µÄÊÇfalseÄØ£¿ÈÃÎÒÃÇÀ´¿´¿´Õâ¸ö³ÌÐòÖеÄÊý¾ÝÔÚÄÚ´æÖзÖÅäµÄÇé¿ö°É¡£
Ê×ÏÈ£¬ÎÒÃÇ·ÖÎöµÚÒ»ÌõÓï¾äString s1=new String("abc");
ÆäʵÕâÌõÓï¾äÊÇÏÂÃæÁ½ÌõÓï¾äµÄËõд£¬
String s1; //1
s1=new String(“abc”); //2
1. ÔÚÕ»ÄÚ´æÖж¨ÒåÒ»¸öÃûΪs1µÄ¶ÔStringÀàµÄ¶ÔÏñÒýÓñäÁ¿
2. ÔÚ¶ÑÄڴ濪±ÙÁËÒ»¿é¿Õ¼äÓÃÓÚ´æ·Å×Ö·û´®“abc”£¬½«1¶¨ÒåµÄÒýÓñäÁ¿s1Ö¸Ïò¸Ã¿Õ¼ä¡£
ͬÀí£¬µÚ¶þÌõÓï¾äString s2=new String("abc");Ò²×öÁËͬÑùµÄÊÂÇ飬¶¨ÒåÒýÓñäÁ¿£¬Ö¸Ïòпª±Ù³öÀ´µÄ¿Õ¼ä¡£Ëµµ½ÕâÀï´ó¼Ò¿ÉÄÜÐÄÖÐÒѾÓдð°¸ÁË£¬ÎªÊ²Ã´s1!=s2ÄØ£¿ÒòΪËüÃÇÖ¸ÏòµÄÊÇÁ½¿é²»Í¬µÄ¶ÑÄÚ´æ¿Õ¼ä¡£
Æäʵ£¬ÔÚjavaÖÐnew¹ý³Ì·ÖÅäÄÚ´æÇé¿ö¶¼ºÍÉÏÃæÀàËÆ£¬ÏÈÔÚÕ»ÄÚ´æÖж¨ÒåÒýÓã¬È»ºóÔÚ¶ÑÄÚ´æÖпª±Ù¿Õ¼ä£¬´æ·ÅÊý¾Ý£¬×îºóÈÃÒýÓÃÖ¸Ïò¸Ã¿Õ¼ä£¬Èç¹ûÒ»¸öÒýÓÃûÓÐÖ¸ÏòÈκοռ䣬ÄÇôÔÚʹÓÃÕâ¸öÒýÓñäÁ¿Ê±£¬³ÌÐò½«Å׳öÖøÃûµÄNullPointerException£¬Æäʵ´ÓÕâ¸öÒì³£Ãû×ÖÎÒÃÇÒ²ÄÜÇåÎúÖªµÀ²úÉú¸ÃÒì³£µÄÔÒò£¬²»ÊÇÂð
Ïà¹ØÎĵµ£º
°Ñ֮ǰÏîÄ¿ÖÐдµÄÒ»¸öJavaͨÓÃÑéÖ¤Âë³ÌÐòÕûÀíÁËһϣ¬Óë´ó¼Ò·ÖÏí£¬Ï£ÍûÄÜÅ×שÒýÓñ¡£
Ò»¡¢Ö÷Òª¹¦ÄÜ£º
1¡¢Ö§³Ö´¿Êý×Ö¡¢´óд×Öĸ¡¢Ð¡Ð´×Öĸ£¬¼°Á½Á½»ìºÏ»òÈýÕß»ìºÏÀàÐÍÑéÖ¤Â룻
2¡¢Ö§³Ö×Ô¶¨ÒåÌØÊâ×Ö·ûÅųý£¨Èç0oOi1jI£©£»
3¡¢Ö§³ÖͼƬ¼°ÎÄ×ÖÁ½ÖÖÀàÐÍÑéÖ¤Â룻
4¡¢Ö§³Ö×Ô¶¨ÒåÑéÖ¤ÂëͼƬ´óС£»
5¡¢Ö§³Ö×Ô¶¨Òå¸ÉÈÅÏßÌõÊý£»
......
Java Mail·¢ËÍ´øÓÐͼƬµÄhtml¸ñʽµÄÓʼþ£¬Õë¶ÔÓÚÏÔʾͼƬ£¬Ò»°ãÓÐÁ½ÖÖ·½·¨¡£
1. ͼƬ´æÔÚÓÚ·þÎñÆ÷ÉÏ£¬ÎÒÃÇÖ»ÐèÒª°ÑͼƬÔÚ·þÎñÆ÷µÄµÄÁ´½Ó·Å½øÈ¥¼´¿É¡£
ÕâÖÖ·¢Ê½±È½Ï¼òµ¥£¬µ«ÊÇÕâÖÖ·½·¨ÓÐЩȱÏÝ£º
ͼƬ²»Ö§³ÖÀëÏßä¯ÀÀ£»
ÿ´Îä¯ÀÀÓʼþÐèÒª·ÃÎÊweb·þÎñ£¬Ôö¼Ó·þÎñÆ÷¸ºµ££»
ÈôͼƬÒÔ¶þ½øÖƵķ½Ê½´æÔÚÓÚÊý¾Ý¿â»òÊǶ¯Ì¬É ......
/**
SimpleDateFormatº¯ÊýÓï·¨£º
G Äê´ú±êÖ¾·û
y Äê
M ÔÂ
d ÈÕ
h ʱ ÔÚÉÏÎç»òÏÂÎç (1~12)
H ʱ ÔÚÒ»ÌìÖÐ (0~23)
m ·Ö
s Ãë
S ºÁÃë
E ÐÇÆÚ
D Ò»ÄêÖеĵڼ¸Ìì
F Ò»ÔÂÖеڼ¸¸öÐÇÆÚ¼¸
w Ò»Äê ......
Ê®ÄêÇ°£¬Sun΢ϵͳ¹«Ë¾½«Java°áµ½ÁËÊÀÈËÃæÇ°£¬ÕâÊÇÊ×´ÎÐÖúÆóÒµ½¨Á¢¾ßÓÐÇ°Õ°ÐÔµÄ˼ÏëµÄÒ»¿îÈí¼þ£¬ËæºóJavaѸÃÍÀ©É¢£¬ÉîÈëµ½¼ÆËã»úÒµµÄ¼¸ºõÿ¸ö½ÇÂä¡£ÕâÏî¼¼ÊõµÄÄ»ºóÓ¢ÐÛ£¬¾ÍÊDZ¾ÎIJɷõÄJames Gosling¡£
ÉϸöÊÀ¼Í90Äê´ú³õ£¬Gosling·¢Æð²¢Áìµ¼ÁËÒ»¸öÃûΪGreenµÄÏîÄ¿£¬´ËÏîÄ¿×îÖÕÑݱäΪJava¡£Java µÄ»ù±¾ÀíÄîÊÇ´´ÔìÒ»ÖÖ¿ÉÒÔ ......
ʹÓÃJAVA¿ª·¢ÏµÍ³ÍÐÅ̳ÌÐò
@for&ever 2009-11-27
²Î¿¼ÎÄÕ¡¶New System Tray Functionality in Java SE 6¡·£¬ÍøÖ· http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/systemtray/ ¡£
JDK±ØÐëÒªÔÚ 1.6 °æ±¾¡£
×î½üÏîÄ¿ÖÐҪʵÏÖ¶¨Ê±ÈÎÎñ³£×¤ÏµÍ³£¬Äܹ»Í¬Ê±ÓÐÒ»¸ö±È½ÏÓѺõIJÙ×÷·½Ê½Ìṩ¸ø ......