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

java ÊØ»¤Ị̈߳¨Daemon£© £¨×ª£©


JavaÓÐÁ½ÖÖThread£º“ÊØ»¤Ïß³ÌDaemon”Óë“Óû§Ïß³ÌUser”¡£
ÎÒÃÇ֮ǰ¿´µ½µÄÀý×Ó¶¼ÊÇÓû§£¬ÊØ»¤Ïß³ÌÊÇÒ»ÖÖ“ÔÚºǫ́ÌṩͨÓÃÐÔÖ§³Ö”µÄỊ̈߳¬Ëü²¢²»ÊôÓÚ³ÌÐò±¾Ìå¡£
´Ó×ÖÃæÉÏÎÒÃǺÜÈÝÒ×½«ÊØ»¤Ïß³ÌÀí½â³ÉÊÇÓÉÐéÄâ»ú£¨virtual machine£©ÔÚÄÚ²¿´´½¨µÄ£¬¶øÓû§Ïß³ÌÔòÊÇ×Ô¼ºËù´´½¨µÄ¡£ÊÂʵ²¢²»ÊÇÕâÑù£¬ÈκÎÏ̶߳¼¿ÉÒÔÊÇ“ÊØ»¤Ïß³ÌDaemon”»ò“Óû§Ïß³ÌUser”¡£ËûÃÇÔÚ¼¸ºõÿ¸ö·½Ã涼ÊÇÏàͬµÄ£¬Î¨Ò»µÄÇø±ðÊÇÅжÏÐéÄâ»úºÎʱÀ뿪£º
Óû§Ị̈߳ºJavaÐéÄâ»úÔÚËüËùÓзÇÊØ»¤Ïß³ÌÒѾ­À뿪ºó×Ô¶¯À뿪¡£
ÊØ»¤Ị̈߳ºÊØ»¤Ïß³ÌÔòÊÇÓÃÀ´·þÎñÓû§Ï̵߳ģ¬Èç¹ûûÓÐÆäËûÓû§Ïß³ÌÔÚÔËÐУ¬ÄÇô¾ÍûÓпɷþÎñ¶ÔÏó£¬Ò²¾ÍûÓÐÀíÓɼÌÐøÏÂÈ¥¡£
setDaemon(boolean on)·½·¨¿ÉÒÔ·½±ãµÄÉèÖÃÏ̵߳ÄDaemonģʽ£¬trueΪDaemonģʽ£¬falseΪUserģʽ¡£setDaemon(boolean on)·½·¨±ØÐëÔÚÏß³ÌÆô¶¯Ö®Ç°µ÷Ó㬵±Ïß³ÌÕýÔÚÔËÐÐʱµ÷Óûá²úÉúÒì³£¡£isDaemon·½·¨½«²âÊÔ¸ÃÏß³ÌÊÇ·ñΪÊØ»¤Ï̡߳£ÖµµÃÒ»ÌáµÄÊÇ£¬µ±ÄãÔÚÒ»¸öÊØ»¤Ïß³ÌÖвúÉúÁËÆäËûỊ̈߳¬ÄÇôÕâЩвúÉúµÄÏ̲߳»ÓÃÉèÖÃDaemonÊôÐÔ£¬¶¼½«ÊÇÊØ»¤Ị̈߳¬Óû§Ïß³ÌͬÑù¡£
import java.io.IOException;
/** *//**
* ÊØ»¤Ïß³ÌÔÚûÓÐÓû§Ï߳̿ɷþÎñʱ×Ô¶¯À뿪
* @author Î嶷Ã×
* @blog http://blog.csdn.net/mq612
*/
public class TestMain4 extends Thread ...{
    
    public TestMain4() ...{
     }
    /** *//**
      * Ï̵߳Ärun·½·¨£¬Ëü½«ºÍÆäËûÏß³ÌͬʱÔËÐÐ
     */
    public void run() ...{
        for(int i = 1; i <= 100; i++)...{
            try ...{
                 Thread.sleep(100);
             } catch (InterruptedException ex) ...{
                 ex.printStackTrace();
        &n


Ïà¹ØÎĵµ£º

Java½Ó¿Ú×ܽá

java½Ó¿Ú
ʲôÊǽӿÚ
¡¡¡¡JavaÖеĽӿÚÊÇһϵÁз½·¨µÄÉùÃ÷£¬ÊÇһЩ·½·¨ÌØÕ÷µÄ¼¯ºÏ£¬Ò»¸ö½Ó¿ÚÖ»Óз½·¨µÄÌØÕ÷ûÓз½·¨µÄʵÏÖ£¬Òò´ËÕâЩ·½·¨¿ÉÒÔÔÚ²»Í¬µÄµØ·½±»²»Í¬µÄÀàʵÏÖ£¬¶øÕâЩʵÏÖ¿ÉÒÔ¾ßÓв»Í¬µÄÐÐΪ(¹¦ÄÜ)¡£
¡¡¡¡½Ó¿ÚµÄÁ½ÖÖº¬Ò壺һ£¬Java½Ó¿Ú£¬JavaÓïÑÔÖдæÔڵĽṹ£¬ÓÐÌض¨µÄÓï·¨ºÍ½á¹¹;¶þ£¬Ò»¸öÀàËù¾ßÓеķ½·¨µÄÌ ......

Javaµ÷ÓÃϵͳÃüÁîѧϰ£¨Èý£©

ѧϰÁËÁ½ÆªµÄRuntimeÀ࣬ÏÖÔÚ¶ÔËüÓÐÁ˸üÉîÒ»²ãµÄÁ˽⣬ÄÇôÎÒÃÇÀ´¿´¿´ÏÂÃæµÄ´úÂ룺
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader ;
import java.io.BufferedReader;
public class Exec_Output{
public static void main(String []args)throws IOException,Int ......

web service:java ºÍ .netÖ®¼ä»¥²Ù×÷

ͨ¹ýWeb Service»ìºÏ.NETºÍJava¼¼ÊõÍùÍùºÜÈÝÒ×£¬µ«Web Service²¢·ÇÊÇ.NETºÍJava»¥²Ù×÷µÄÍòÁ鵤¡£Web ServiceÔÚ¼¯³É¶ÀÁ¢µÄ¿çÍøÂçͨÐŵÄ×é¼þʱ·Ç³£ÓÐÓã¬ÔÚ¼òµ¥µÄµ÷ÓÃ/·µ»ØÇé¾°ÖУ¬Éæ¼°µÄÊý¾ÝÀàÐÍÊýÁ¿·Ç³£ÓÐÏÞ£¬ÇÒWeb ServiceÊÇ»ùÓÚ±ê×¼µÄ£¬»ìºÏ.NETºÍJava¼¼Êõͨ³£ÏԵúܼòµ¥£¬Òò´ËÓÐÈËÈÏΪWeb Serv ......

java´úÀíģʽ¼°¶¯Ì¬´úÀíÀà

  java´úÀíģʽ¼°¶¯Ì¬´úÀíÀà ÊÕ²Ø
 
¶Ô´úÀíģʽÓëJava¶¯Ì¬´úÀíÀàµÄÀí½â
1.      ´úÀíģʽ
´úÀíģʽµÄ×÷ÓÃÊÇ£ºÎªÆäËû¶ÔÏóÌṩһÖÖ´úÀíÒÔ¿ØÖƶÔÕâ¸ö¶ÔÏóµÄ·ÃÎÊ¡£ÔÚijЩÇé¿öÏ£¬Ò»¸ö¿Í»§²»Ïë»òÕß²»ÄÜÖ±½ÓÒýÓÃÁíÒ»¸ö¶ÔÏ󣬶ø´úÀí¶ÔÏó¿ÉÒÔÔÚ¿Í»§¶ËºÍÄ¿±ê¶ÔÏóÖ®¼äÆðµ½ÖнéµÄ×÷Óá£
´úÀ ......

java¹ØÓÚ23ÖÖÉè¼Æģʽ֮ÅÝMM°æ£¨ÍƼö£©[ת]


´´½¨ÐÍģʽ
1¡¢FACTORY——×·MMÉÙ²»ÁËÇë³Ô·¹ÁË£¬Âóµ±À͵ļ¦³áºÍ¿ÏµÂ»ùµÄ¼¦³á¶¼ÊÇMM°®³ÔµÄ¶«Î÷£¬ËäÈ»¿ÚζÓÐËù²»Í¬£¬µ«²»¹ÜÄã´øMMÈ¥Âóµ±ÀÍ»ò¿ÏµÂ»ù£¬Ö»¹ÜÏò·þÎñԱ˵“À´Ëĸö¼¦³á”¾ÍÐÐÁË¡£Âóµ±ÀͺͿϵ»ù¾ÍÊÇÉú²ú¼¦³áµÄFactory
¹¤³§Ä£Ê½£º¿Í»§ÀàºÍ¹¤³§Àà·Ö¿ª¡£Ïû·ÑÕßÈκÎʱºòÐèҪijÖÖ²úÆ·£¬Ö»ÐèÏò¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ