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

JavaỊ̈߳ºÏ̵߳ĵ÷¶È Èò½

JavaỊ̈߳ºÏ̵߳ĵ÷¶È-Èò½
 
Ï̵߳ÄÈò½º¬Òå¾ÍÊÇʹµ±Ç°ÔËÐÐ×ÅÏß³ÌÈóöCPU×ÊÔ´£¬µ«ÊÇÈ»¸øË­²»ÖªµÀ£¬½ö½öÊÇÈóö£¬Ïß³Ì״̬»Øµ½¿ÉÔËÐÐ״̬¡£
 
Ï̵߳ÄÈò½Ê¹ÓÃThread.yield()·½·¨£¬yield() Ϊ¾²Ì¬·½·¨£¬¹¦ÄÜÊÇÔÝÍ£µ±Ç°ÕýÔÚÖ´ÐеÄÏ̶߳ÔÏ󣬲¢Ö´ÐÐÆäËûÏ̡߳£
 
/**
* JavaỊ̈߳ºÏ̵߳ĵ÷¶È-Èò½
*
* @author leizhimin 2009-11-4 9:02:40
*/
public class Test {
        public static void main(String[] args) {
                Thread t1 = new MyThread1();
                Thread t2 = new Thread(new MyRunnable());
                t2.start();
                t1.start();
        }
}
class MyThread1 extends Thread {
        public void run() {
                for (int i = 0; i < 10; i++) {
                        System.out.println("Ïß³Ì1µÚ" + i + "´ÎÖ´ÐУ¡");
                }
        }
}
class MyRunnable implements Runnable {
        public void run() {
                for (int i = 0; i < 10; i++) {
                        System.out.println("Ïß³Ì2


Ïà¹ØÎĵµ£º

Ãô½Ý¿ª·¢Öбàд¸ßÖÊÁ¿Java´úÂë

Ô­Îijö´¦£ºhttp://java.csdn.net/a/20100308/259219.html
Ãô½Ý¿ª·¢µÄÀíÄîÒѾ­Á÷ÐÐÁ˺ܳ¤µÄʱ¼ä£¬ÔÚÃô½Ý¿ª·¢ÖеĿª·¢µü´ú½×¶ÎÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÎå¸ö²½Ö裬À´ÓÐЧµÄÌá¸ßÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿¡£
JavaÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÓÉÓÚ¿ª·¢ÈËÔ±µÄ¾­Ñé¡¢Java´úÂë±àдϰ¹ß£¬ÒÔ¼°È±·¦Í³Ò»µÄ±ê×¼ºÍ¹ÜÀíÁ÷³Ì£¬ÍùÍùµ¼ÖÂÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿½Ï²î£¬ÄÑÓ ......

java ¼¸ÖÖÅÅÐòËã·¨


//ÅÅÐòºÍ²éÕÒÊÇÊý¾Ý½á¹¹ÓëËã·¨Éè¼ÆµÄÖØÒªÄÚÈÝ
/*
ÅÅÐòÖ÷Òª°üÀ¨
1.²åÈëÅÅÐò£ºÓÖ°üÀ¨Ö±½Ó²åÈëÅÅÐò¡¢¶þ·Ö·¨²åÈëÅÅÐò¡¢±í²åÈëÅÅÐò¡¢ShellÅÅÐò
2.Ñ¡ÔñÅÅÐò£º°üÀ¨Ö±½ÓÑ¡ÔñÅÅÐò¡¢¶ÑÅÅÐò
3.½»»»ÅÅÐò£ºÃ°ÅÝÅÅÐò¡¢¿ìËÙÅÅÐò
4.·ÖÅäÅÅÐò£ºÖ÷ÒªÓлùÊýÅÅÐò
5.¹é²¢ÅÅÐò£ºÖ÷ÒªÓÐÄÚÅÅÐò¡¢ÍâÅÅÐò
×¢£ºÒÔϳÌÐò¾ùÔÚ±¾È˵çÄÔÉÏͨ¹ýÍêÕ ......

¹ØÓÚÌá¸ß×Ô¼ºjavaˮƽµÄÊ®´ó¼¼Êõ

¹ØÓÚÌá¸ß×Ô¼ºjavaˮƽµÄÊ®´ó¼¼Êõ£¨×ª£©
±¾ÎÄÁгöÁ˵±½ñ¼ÆËã»úÈí¼þ¿ª·¢ºÍÓ¦ÓÃÁìÓò×îÖØҪʮÖֹؼü¼¼ÊõÅÅÃû£¬Èç¹ûÄãÏë±£Ö¤ÄãÏÖÔÚÒÔ¼°Î´À´µÄ¼¸Ä겻ʧҵ£¬ÄÇôÄã×îºÃ¸úÉÏÕâЩ¼¼ÊõµÄ·¢Õ¹¡£ËäÈ»Äã²»±Ø¶ÔÕâÊ®ÖÖ¼¼ÊõÑùÑù¾«Í¨£¬µ«ÖÁÉÙÓ¦¸Ã¶ÔËüÃǷdz£ÊìϤ¡£
¡¡¡¡Ò»¡¢XML
¡¡¡¡ÔÚÊ®ÖÖ¼¼ÊõÖУ¬×îÖØÒªµÄÒ»ÖÖ¼¼ÊõÎÒÏëÓ¦¸Ã·ÇXMLĪÊô¡£Õâ ......

Java¶àÏ̱߳à³Ì×ܽá

Java¶àÏ̱߳à³Ì×ܽá
 
ÏÂÃæÊÇJavaÏß³ÌϵÁв©ÎĵÄÒ»¸ö±àÄ¿£º
 
JavaỊ̈߳º¸ÅÄîÓëÔ­Àí
JavaỊ̈߳º´´½¨ÓëÆô¶¯
JavaỊ̈߳ºÏß³ÌջģÐÍÓëÏ̵߳ıäÁ¿
JavaỊ̈߳ºÏß³Ì״̬µÄת»»
JavaỊ̈߳ºÏ̵߳Äͬ²½ÓëËø
JavaỊ̈߳ºÏ̵߳Ľ»»¥
JavaỊ̈߳ºÏ̵߳ĵ÷¶È-ÐÝÃß
JavaỊ̈߳ºÏ̵߳ĵ÷¶È-ÓÅÏȼ¶
JavaỊ̈߳ºÏß ......

JavaỊ̈߳ºÏ̵߳ĵ÷¶È ÓÅÏȼ¶

JavaỊ̈߳ºÏ̵߳ĵ÷¶È-ÓÅÏȼ¶
 
ÓëÏß³ÌÐÝÃßÀàËÆ£¬Ï̵߳ÄÓÅÏȼ¶ÈÔÈ»ÎÞ·¨±£ÕÏÏ̵߳ÄÖ´ÐдÎÐò¡£Ö»²»¹ý£¬ÓÅÏȼ¶¸ßµÄÏ̻߳ñÈ¡CPU×ÊÔ´µÄ¸ÅÂʽϴó£¬ÓÅÏȼ¶µÍµÄ²¢·Çû»ú»áÖ´ÐС£
 
Ï̵߳ÄÓÅÏȼ¶ÓÃ1-10Ö®¼äµÄÕûÊý±íʾ£¬ÊýÖµÔ½´óÓÅÏȼ¶Ô½¸ß£¬Ä¬ÈϵÄÓÅÏȼ¶Îª5¡£
 
ÔÚÒ»¸öÏß³ÌÖпªÆôÁíÍâÒ»¸öÐÂỊ̈߳¬ÔòпªÏ̳߳ÆÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ