Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÐéÄâ»ú·½Ê½ÏÂÔËÐÐmatlab

ÔÚ·ÇjavaÐéÄâ»úÏÂÔËÐÐmatlab¾Ý˵¿ÉÒÔÀ©´óÄÚ´æ,Æô¶¯·ÇjavaÐéÄâ»úÏÂÔËÐÐ matlabµÄ·½·¨ÓУº
Ò».
1¡¢ÓÒ½¨µãmatlab¿ì½Ý·½Ê½£¬Ñ¡ÊôÐÔ ......

Delphiʱ¼äºÍJavaʱ¼äµÄת»»Àà¡£

ÕâÑùÒ»À´£¬DelphiʹÓÃWebserviceºÍJAVAͨѶʱ£¬¿ÉÒÔ½«DELPHIµÄʱ¼äÖ±½Ó´«¸øJAVA¡£´Ó¶øÃâÈ¥ÁËʱ¼ä×Ö·û´®parseÖ®¼äµÄÏûºÄ£¬Ìá¸ßµÄ³ÌÐòЧÂÊ¡£
Delphiʱ¼äʵÖʾÍÊÇdoubleÀàÐÍ£¬ÕûÊý²¿·Ö±íʾÌ죬СÊý²¿·Ö±íʾµ±Ììʱ¼ä£¬Ã¿ºÁÃëΪ1/86400000¡£¿¼Âǵ½Ê±ÇøµÄת»»ºó£¬JAVAºÍDELPHIʱ¼äÖ®¼äµÄת»»ÀàÈçÏ£º
import java.util.Calendar ......

Java ¶àÏ̱߳à³ÌÖ®Áù£ºÏß³ÌÖ®¼äµÄͨÐÅ£¨¸½Ô´´úÂ룩

Java ¶àÏ̱߳à³ÌÖ®Áù£ºÏß³ÌÖ®¼äµÄͨÐÅ£¨¸½Ô´´úÂ룩
Ô´´úÂëÏÂÔØ
       
¶àÏ̱߳à³ÌÖУ¬Ïß³ÌÖ®¼äµÄͨÐÅÊÇÒ»¸ö±È½Ï¸´ÔÓµÄÎÊÌâ¡£´ó¼ÒÍùÍù¸ã²»¶®Ê²Ã´ÊǾºÕù×ÊÔ´£¿Ê²Ã´Ê±ºò¿¼ÂÇͬ²½£¿Ôõô½øÐÐͬ²½£¿Ê²Ã´ÊÇÏß³ÌͨÐÅ£¿Ôõô½øÐÐͨÐÅ£¿ºÜ
¶àÅóÓÑÃæÊÔµÄʱºò¶¼Óöµ½¹ýÕâÑùÀàËƵÄÒ»¸ö±à³ÌÌ⣺¸ø¶ ......

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


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

java ¼òµ¥¹¤³§Éè¼Æģʽ

ÏÈд³ÌÐò£¬ÔÚÀ´½âÊͼòµ¥¹¤³§ºÍ¹¤³§·½·¨Ä£Ê½¡£
1¡¢¶¨ÒåÒ»¸öÆû³µ½Ó¿Ú
package com.beckham.factory;
/**
* @author ×÷Õß<Beckham>
* Email:gaowm0207@gmail.com
* Jan 26, 2010 2:35:15 PM
* Version:1.0
*/
public interface Car {
public void start() ;
}

½Ó¿ÚÀïÃ涨ÒåÒ»¸ö·½·¨£ºstart( ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ