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

(1) Java ¼¼ÊõµÄ»ýÀÛ _DaemonÊØ»¤Ïß³Ì

 
Ïß³Ì Thread setDaemon ·½·¨

2009Äê07ÔÂ24ÈÕ ÐÇÆÚÎå 14:37

Thread setDaemon ·½·¨
import java.io.IOException;
/*
* ÊØ»¤Ïß³ÌÔÚûÓÐÓû§Ï߳̿ɷþÎñʱ×Ô¶¯À뿪
* ÔÚJavaÖбȽÏÌØÊâµÄÏß³ÌÊDZ»³ÆΪÊØ»¤£¨Daemon£©Ï̵߳ĵͼ¶±ðÏ̡߳£
* Õâ¸öÏ߳̾ßÓÐ×îµÍµÄÓÅÏȼ¶£¬ÓÃÓÚΪϵͳÖеÄÆäËü¶ÔÏóºÍÏß³ÌÌṩ·þÎñ¡£
* ½«Ò»¸öÓû§Ïß³ÌÉèÖÃΪÊØ»¤Ï̵߳ķ½Ê½ÊÇÔÚÏ̶߳ÔÏó´´½¨Ö®Ç°µ÷ÓÃÏ̶߳ÔÏóµÄsetDaemon·½·¨¡£
* µäÐ͵ÄÊØ»¤Ïß³ÌÀý×ÓÊÇJVMÖеÄϵͳ×ÊÔ´×Ô¶¯»ØÊÕỊ̈߳¬
* ÎÒÃÇËùÊìϤµÄJavaÀ¬»ø»ØÊÕÏ߳̾ÍÊÇÒ»¸öµäÐ͵ÄÊØ»¤Ị̈߳¬
* µ±ÎÒÃǵijÌÐòÖв»ÔÙÓÐÈκÎÔËÐÐÖеÄThread£¬
* ³ÌÐò¾Í²»»áÔÙ²úÉúÀ¬»ø£¬À¬»ø»ØÊÕÆ÷Ò²¾ÍÎÞÊ¿É×ö£¬
* ËùÒÔµ±À¬»ø»ØÊÕÏß³ÌÊÇJavaÐéÄâ»úÉϽöÊ£µÄÏß³Ìʱ£¬JavaÐéÄâ»ú»á×Ô¶¯À뿪¡£
* ËüʼÖÕÔڵͼ¶±ðµÄ״̬ÖÐÔËÐУ¬ÓÃÓÚʵʱ¼à¿ØºÍ¹ÜÀíϵͳÖеĿɻØÊÕ×ÊÔ´¡£
* ÊØ»¤½ø³Ì£¨Daemon£©ÊÇÔËÐÐÔÚºǫ́µÄÒ»ÖÖÌØÊâ½ø³Ì¡£Ëü¶ÀÁ¢ÓÚ¿ØÖÆÖն˲¢ÇÒÖÜÆÚÐÔµØÖ´ÐÐijÖÖÈÎÎñ»òµÈ´ý´¦ÀíijЩ·¢ÉúµÄʼþ¡£
* Ò²¾ÍÊÇ˵ÊØ»¤Ï̲߳»ÒÀÀµÓÚÖնˣ¬µ«ÊÇÒÀÀµÓÚϵͳ£¬Óëϵͳ“ͬÉú¹²ËÀ”¡£
* ÄÇJavaµÄÊØ»¤Ïß³ÌÊÇʲôÑù×ÓµÄÄØ¡£
* µ±JVMÖÐËùÓеÄÏ̶߳¼ÊÇÊØ»¤Ï̵߳Äʱºò£¬JVM¾Í¿ÉÒÔÍ˳öÁË£»
* Èç¹û»¹ÓÐÒ»¸ö»òÒÔÉϵķÇÊØ»¤Ïß³ÌÔòJVM²»»áÍ˳ö¡£
*/
public class testThread extends Thread {
   
    public testThread() {
    }
    /** *//**
     * Ï̵߳Ärun·½·¨£¬Ëü½«ºÍÆäËûÏß³ÌͬʱÔËÐÐ
     */
    public void run(){
        for(int i = 1; i <= 100; i++){
            try{
                Thread.sleep(100);
               
            } catch (InterruptedException ex){
              &nb


Ïà¹ØÎĵµ£º

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

ÎÒµÄJavaѧϰ֮·2009

-------------------------------2009Äê3ÔÂ19ÈÕ¿ªÊ¼-----------------------------
ÏÂÔØJDK Myeclipse Netbeans JBulider²¢°²×°
ËïöÎ »ù´¡½²½â
ÂíÊ¿±ø »ù´¡½²½â
ÂíÊ¿±ø ̹¿Ë´óÕ½ (µ¥»ú°æ±¾! °üÀ¨Í¼Æ¬°æ)
¹ù¿Ë»ª J2ME -----------------------------------2009Äê5ÔÂ2ÈÕ------ ......

JAVA¶ÌÐŶþ´Î¿ª·¢°ü,JAVA¶ÌÐŶþ´Î¿ª·¢¿Ø¼þ

 JAVA¿ª·¢°ü¹¦Äܼò½é
 
  TerrySMS for Java ÊÇÓÃJAVA¿ØÖÆGSM ModemʵÏÖ¶ÌÐÅÊÕ·¢¹¦ÄܵĿª·¢°ü¡£ÀûÓÃTerrySMS¿ÉÒÔʵÏÖ¿çƽ̨µÄ¶ÌÐÅ·¢ËÍ£¬Ä¿Ç°Ö§³ÖwindowsXP¡¢2000¡¢2003¡¢LinuxµÈ²Ù×÷ϵͳ¡£ÊÇʵÏÖÒµÎñϵͳºÍ¶ÌÐÅϵͳ¼Þ½ÓµÄÀíÏ빤¾ß¡£
 
 
 JAVA¿ª·¢°ü¹¦ÄܽéÉÜ
 
 1¡¢Ä¿Ç°Ö ......

JAVA µ¼³öCSV´úÂë

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import au.com.bytecode.opencsv.CSVWriter;
public class CsvDemo {
    
    public static void main(String[] args) throws IOException {
        
     ......

mysqlÖÐÎÄÅÅÐò¼°javaÖÐÎÄÅÅÐò


Ö®ËùÒÔдÕâƪ²©¿Í£¬ÊÇÒòΪǰ¼¸Ìì²ÅÅöµ½ÁËÕâôһ¸öÎÊÌ⣬ÒÔÇ°»¹²»ÖªµÀmysqlÓÐÕâôһ¸öÎÊÌâ¡£
ÎÒÃǵÄϵͳʹÓÃÁËstruts+hibernate£¬Êý¾Ý¿âʹÓõÄÊÇmysql£¬×Ö·û¼¯Í³Ò»Îªutf-8¡£
±¾À´ÒѾ­Íê³ÉÁË£¬µ«ÊÇϵͳʹÓõÄʱºò£¬·¢ÏÖ²é³öÀ´µÄÈËÃûûÓÐ˳Ðò£¬±¾À´ÒÔΪºÜ¼òµ¥£¬ÔÚ²éѯµÄʱºò£¬Ö¸¶¨°´ÕÕnameÅÅÐò¾Í¿ÉÒÔÁË£¬Æñ֪ʵ¼ÊÒ»×ö²Å·¢Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ