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

JavaÖØÐ´ÓëÖØÔØ

ÖØÐ´µÄÖ÷ÒªÓŵãÊÇÄܹ»¶¨Òåij¸ö×ÓÀàÌØÓеÄÌØÕ÷:
       Èç:
    public class Father
    {
             public void speak()
             {
               System.out.println("Father");
             }                  
    }
   public class Son extends Father
    {
             public void speak()
             {
               System.out.println("son");
             }                  
    }
ÕâÒ²½Ð×ö¶à̬ÐÔ,ÖØÐ´·½·¨Ö»ÄÜ´æÔÚÓÚ¾ßÓм̳йØÏµÖÐ,ÖØÐ´·½·¨Ö»ÄÜÖØÐ´¸¸Àà·Ç˽Óеķ½·¨,
  
    µ±ÉÏÀýÖÐ FatherÀà speak()·½·¨±»privateʱ,SonÀ಻ÄÜÖØÐ´ FatherÀà speak()·½·¨,´ËʱSonÀà speak()·½·¨Ï൱ÓëÔÚSonÀàÖж¨ÒåµÄÒ»¸öspeak()·½·¨.
FatherÀà speak()·½·¨Ò»µ«±»finalʱ,ÎÞÂ۸÷½·¨±»public,protected¼°Ä¬ÈÏËùÐÞÊÎʱ,SonÀà¸ù±¾²»ÄÜÖØÐ´ FatherÀà speak()·½·¨,ÊÔͼ±àÒë´úÂëʱ,±àÒëÆ÷»á±¨´í.Àý:
   public class Father
    {
          fianl   public void speak()
             {
               System.out.println("Father");
         &


Ïà¹ØÎĵµ£º

ʹÓÃjavaÖÐµÄ synchronized½øÐÐÏß³Ìͬ²½

ÔÚjava±à³Ì˼ÏëÖжÔsynchronizedµÄÒ»µã½âÊÍ:
1¡¢synchronized¹Ø¼ü×ÖµÄ×÷ÓÃÓòÓжþÖÖ£º
1£©ÊÇij¸ö¶ÔÏóʵÀýÄÚ£¬synchronized aMethod(){}¿ÉÒÔ·ÀÖ¹¶à¸öÏß³Ìͬʱ·ÃÎÊÕâ¸ö¶ÔÏóµÄsynchronized·½·¨£¨Èç¹ûÒ»¸ö¶ÔÏóÓжà¸ösynchronized·½·¨£¬Ö»ÒªÒ»¸öÏ̷߳ÃÎÊÁËÆäÖеÄÒ»¸ösynchronized·½·¨£¬ÆäËüÏ̲߳»ÄÜͬʱ·ÃÎÊÕâ¸ö¶ÔÏóÖÐÈκÎÒ»¸ö ......

Java Éú³ÉÑéÖ¤Âë


javaÉú³ÉÑéÖ¤Âë
ÓкܶàÖÖ·½Ê½£¬ÔÚÍøÉÏÒ²Óкܶà´úÂ룬µ«ÊÇÄÇЩÉú³ÉµÄЧ¹û£¬¸Ð¾õ¶¼²»ÊÇÌØ±ðºÃ£¬ËùÒÔÎÒÔÚËûÃǵĻù´¡ÉϸÄÁ¼ÁËһЩ¡£
µ«ÄÜ»¹¿ÉÒÔÓÃjmagick ,Éú³ÉºÜ¶àºÜìŵÄÑéÖ¤Âë¡£¹ýÁ½ÌìÑо¿Ï¡£ÏȰÑ×î½ü¸ÄµÄÕâ¸ö·¢²¼Ï¹©ÅóÓÑÃDzΡ£
¿ÉÒÔÏÈ¿´¿´ÑùÀý¡£×î½üÔÚ×öÕâ¸öÍøÕ¾¡£´ó¼ÒÓÐÐËȤ¿ÉÒԽн»Á÷¡£Ô¼»á360 ÍøÖ·:  www.yue ......

javaÖÐstringÓëÆäËûÀàÐÍÖ®¼äµÄ»¥Ïàת»»

1.½«Int,Float,Double,Longת»»ÎªString
String s = ""+i;
String s = String.valueOf(i);
String s = Integer.toString(i);
µÚÒ»ÖÖ·½·¨£ºs = ""+i;   //»á²úÉúÁ½¸öString¶ÔÏó
µÚ¶þÖÖ·½·¨£ºs=String.valueOf(i); //Ö±½ÓʹÓÃStringÀàµÄ¾²Ì¬·½·¨£¬Ö»²úÉúÒ»¸ö¶ÔÏó
µÚÈýÖÖ·½·¨£ºÐ§ÂÊ×î¸ß£¿
2.½«Stringת»»ÎªIn ......

½âÎöUnicode±àÂëºÍJava char

JavaµÄ×Ö·ûÀàÐͲÉÓõÄÊÇUTF-16±àÂ뷽ʽ¶ÔUnicode±àÂë±í½øÐбíʾ¡£ÆäÖÐÒ»¸öcharÀàÐ͹̶¨2Bytes£¨16bits£©¡£Ê×ÏÈÏȽéÉÜÒ»ÏÂUnicode±àÂë±íºÍUTF-16±àÂëËã·¨£º
       Unicode±àÂë±íµÄרҵÊõÓ
       ´úÂëµã (code point): Ö¸ÔÚUnicode±àÂë±íÖÐÒ»¸ö×Ö·ûËù¶ÔÓ ......

javaÁìÓò¼´Ê±Í¨ÐŵĽâ¾ö·½°¸Ò»(openfire+spark+smack)

JavaÁìÓòµÄ¼´Ê±Í¨ÐŵĽâ¾ö·½°¸¿ÉÒÔ¿¼ÂÇopenfire+spark+smack¡£µ±È»Ò²ÓÐÆäËûµÄÑ¡Ôñ¡£
¡¡¡¡OpenfireÊÇ»ùÓÚJabberЭÒé(XMPP)ʵÏֵļ´Ê±Í¨ÐÅ·þÎñÆ÷¶Ë°æ±¾£¬Ä¿Ç°½¨ÒéʹÓÃ3.6.4°æ±¾£¬Õâ¸ö°æ±¾Êǵ±Ç°×îеİ汾£¬¶øÇÒÍøÉÏ¿ÉÒÔÕÒµ½ÏÂÔØµÄÔ´´úÂë¡£
¡¡¡¡¼´Ê±Í¨Ðſͻ§¶Ë¿ÉʹÓÃspark2.5.8,Õâ¸ö°æ±¾ÊÇĿǰ×îеÄrelease°æ±¾£¬¾­¹ý²âÊÔ· ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ