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

javaÏ̳߳صÄÔ­ÀíÓëʵÏÖ

javaÏ̳߳صÄÔ­ÀíÓëʵÏÖ



[·ÖÏí]Java Ï̳߳صÄÔ­ÀíÓëʵÏÖ2008-07-18
14:53------------------------------------------------------------------------------------------------
Õ⼸ÌìÖ÷ÒªÊÇ¿ñ¿´Ô´³ÌÐò£¬ÔÚÃÖ²¹ÁËһЩÒÔǰ֪ʶ¿Õ°×µÄͬʱ£¬Ò²Ñ§»áÁ˲»ÉÙеÄ֪ʶ£¨±ÈÈç NIO£©£¬»òÕß³ÆΪм¼Êõ°É¡£
Ï̳߳ؾÍÊÇÆäÖÐÖ®Ò»£¬Ò»Ìáµ½Ị̈߳¬ÎÒÃÇ»áÏëµ½ÒÔÇ°¡¶²Ù×÷ϵͳ¡·µÄÉú²úÕßÓëÏû·ÑÕߣ¬ÐźÅÁ¿£¬Í¬²½¿ØÖƵȵȡ£
Ò»Ìáµ½³Ø£¬ÎÒÃÇ»áÏëµ½Êý¾Ý¿âÁ¬½Ó³Ø£¬µ«ÊÇÏ̳߳ØÓÖÈçºÎÄØ£¿
½¨Ò飺ÔÚÔĶÁ±¾ÎÄÇ°£¬ÏÈÀíÒ»Àíͬ²½µÄ֪ʶ£¬ÌرðÊÇsyncronizedͬ²½¹Ø¼ü×ÖµÄÓ÷¨¡£
¹ØÓÚÎÒ¶Ôͬ²½µÄÈÏʶ£¬ÒªÔµÓÚ´óÈýÄêµÄÒ»±¾Ê飬ÊéÃûºÃÏñÊÇ Java ʵս£¬Õâ±¾ÊéдµÃʵÔÚÌ«ÃîÁË£¬ÕæÕýµÄ´ÓÀíÂÛµ½Êµ¼ù£¬´Ó½Øͼ·ÖÎöµ½.class×Ö½ÚÂë·ÖÎö¡£ÍÛ£¬ÎÒÏëÊг¡ÉϺÜÄÑÂòµ½Õâô¾«ÖµÄÊéÁË¡£×÷Ϊһ¸öJava°®ºÃÕߣ¬ÎÒ¾õµÃ¾ø¶ÔÖµµÃÒ»¶Á¡£
ÎÒ¶Ô´ËÊéÓ¡Ïó×îÉîÖ®Ò»µÄ¾ÍÊÇ£ºequal()·½·¨£¬ÓÉdzÈëÉ¾­µä£¡
»¹ÓоÍÊÇͬ²½ÁË£¬ÆäÖÐÌáµ½ÁËÎҵļ¸¸ö±à³ÌÎóÇø£¬ÒÔÇ°ÈçºÎʹÓÃͬ²½Ìá¸ßÐÔÄܵȵȣ¬Í¨¹ýѧϰ£¬Ê¹ÎÒ¶Ôͬ²½µÄÈÏʶ½øÒ»²½¼ÓÉî¡£
--------------------------------------------------------------------------------------------------
¼òµ¥½éÉÜ
    ´´½¨Ïß³ÌÓÐÁ½ÖÖ·½Ê½£º¼Ì³ÐThread»òʵÏÖRunnable¡£ThreadʵÏÖÁËRunnable½Ó¿Ú£¬ÌṩÁËÒ»¸ö¿ÕµÄrun()·½·¨£¬ËùÒÔ²»ÂÛÊǼ̳ÐThread»¹ÊÇʵÏÖRunnable£¬¶¼ÒªÓÐ×Ô¼ºµÄrun()·½·¨¡£
    Ò»¸öÏ̴߳´½¨ºó¾Í´æÔÚ£¬µ÷ÓÃstart()·½·¨¾Í¿ªÊ¼ÔËÐУ¨Ö´ÐÐrun()·½·¨£©£¬µ÷ÓÃwait½øÈëµÈ´ý»òµ÷ÓÃsleep½øÈëÐÝÃßÆÚ£¬Ë³ÀûÔËÐÐÍê±Ï»òÐÝÃß±»ÖжϻòÔËÐйý³ÌÖгöÏÖÒì³£¶øÍ˳ö¡£
waitºÍsleep±È½Ï£º
    sleep·½·¨ÓУºsleep(long millis)£¬sleep(long millis, long
nanos)£¬µ÷ÓÃsleep·½·¨ºó£¬µ±Ç°Ï߳̽øÈëÐÝÃßÆÚ£¬ÔÝÍ£Ö´ÐУ¬µ«¸ÃÏ̼߳ÌÐøÓµÓмàÊÓ×ÊÔ´µÄËùÓÐȨ¡£µ½´ïÐÝÃßʱ¼äºóÏ߳̽«¼ÌÐøÖ´ÐУ¬Ö±µ½Íê³É¡£ÈôÔÚ
ÐÝÃßÆÚÁíÒ»Ïß³ÌÖжϸÃỊ̈߳¬Ôò¸ÃÏß³ÌÍ˳ö¡£
    wait·½·¨ÓУºwait()£¬wait(long timeout)£¬wait(long timeout, long nanos)£¬µ÷ÓÃwait·½·¨ºó£¬¸ÃÏ̷߳ÅÆú¼àÊÓ×ÊÔ´µÄËùÓÐȨ½øÈëµÈ´ý״̬£»
      wait()£ºµÈ´ýÓÐÆäËüµÄÏ̵߳÷ÓÃnotify()»ònotifyAll()½øÈëµ÷¶È״̬£¬ÓëÆäËüÏ̹߳²Í¬Õù¶á¼àÊÓ¡£wait()Ï൱ÓÚwait(0)£¬wait(0, 0)¡£
      w


Ïà¹ØÎĵµ£º

javaÓÅÊƼ°¿çƽ̨ԭÀí

Ò»¡£javaµÄÓÅÊÆ
1.ÃæÏò¶ÔÏó
2.¿çƽ̨
java×÷ΪһÖÖÍøÂçÓïÑÔ£¬ÆäÔ´´úÂë±»±àÒë³É.class×Ö½ÚÂ룬ÓÉjavaÐéÄâ»úÖ´ÐУ¬
3.¼òµ¥
Ò»£¬java·ç¸ñÀàËÆc++£¬c++³ÌÐòÔ±ÄܺܿìµØÕÆÎÕjava
¶þ£¬javaÞðÆúÁËÖ¸Õ룬½á¹¹£¬Ã¶¾ÙµÈÒ×Òý·¢ÄÚ´æÎÊÌâµÄ²Ù×÷
Èý£¬javaÌṩÁ˷ḻµÄapi£¬Äܹ»°ïÖúÎÒÃÇ¿ìËÙ¿ª·¢
4.½¡×³
Ò»¡£Ç¿ÀàÐ͵ģ¬ÀàÐͼì²éºÜÑ ......

Java»ù´¡ÎÊÌ⣺java.lang.String

Ô­ÎÄ: http://forum.javaeye.com/viewtopic.php?t=17912§Ö÷µÄÎÊÌâÎʵĺ¬º¬ºýºý:flyjie¸ø³öÁ˷dz£ÏêϸµÄ½âÊÍ£¬²»¹ý¾ÍÊÇûÓнâÊÍStringʵÀý»¯µÄÌØÊâ·½ÃæÒÔ¼°Intern()·½·¨µÄº¬Òå----------------------------------------------------------------------------------------------------------------------------------------- ......

JAVA½âÎöXMLµÄËÄÖÖ·½·¨±È½Ï

XMLÏÖÔÚÒѾ­³ÉΪһÖÖͨÓõÄÊý¾Ý½»»»¸ñʽ,ËüµÄƽ̨ÎÞ¹ØÐÔ,ÓïÑÔÎÞ¹ØÐÔ,ϵͳÎÞ¹ØÐÔ,¸øÊý¾Ý¼¯³ÉÓë½»»¥´øÀ´Á˼«´óµÄ·½±ã¡£¶ÔÓÚXML±¾ÉíµÄÓ﷨֪ʶÓë¼¼Êõϸ½Ú,ÐèÒªÔĶÁÏà¹ØµÄ¼¼ÊõÎÄÏ×,ÕâÀïÃæ°üÀ¨µÄÄÚÈÝÓÐDOM(Document Object Model),DTD(Document Type Definition),SAX(Simple API for XML),XSD(Xml Schema Definition),XSLT(Exten ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ