Java¶àÏ̱߳à³ÌÏê½â
Ò»¡¢Àí½â¶àÏß³Ì
¶àÏß³ÌÊÇÕâÑùÒ»ÖÖ»úÖÆ£¬ËüÔÊÐíÔÚ³ÌÐòÖв¢·¢Ö´Ðжà¸öÖ¸ÁîÁ÷£¬Ã¿¸öÖ¸ÁîÁ÷¶¼³ÆΪһ¸öỊ̈߳¬±Ë´Ë¼ä»¥Ïà¶ÀÁ¢¡£Ïß³ÌÓÖ³ÆΪÇáÁ¿¼¶½ø³Ì£¬ËüºÍ½ø³ÌÒ»ÑùÓµÓжÀÁ¢µÄÖ´ÐпØÖÆ£¬ÓɲÙ×÷ϵͳ¸ºÔðµ÷¶È£¬Çø±ðÔÚÓÚÏß³ÌûÓжÀÁ¢µÄ´æ´¢¿Õ¼ä£¬¶øÊǺÍËùÊô½ø³ÌÖеÄÆäËüÏ̹߳²ÏíÒ»¸ö´æ´¢¿Õ¼ä£¬ÕâʹµÃÏ̼߳äµÄͨÐÅÔ¶½Ï½ø³Ì¼òµ¥¡£
¾ßÌåµ½javaÄÚ´æÄ£ÐÍ£¬ÓÉÓÚJava±»Éè¼ÆΪ¿çƽ̨µÄÓïÑÔ£¬ÔÚÄÚ´æ¹ÜÀíÉÏ£¬ÏÔȻҲҪÓÐÒ»¸öͳһµÄÄ£ÐÍ¡£ÏµÍ³´æÔÚÒ»¸öÖ÷Äڴ棨Main Memory£©£¬ JavaÖÐËùÓбäÁ¿¶¼´¢´æÔÚÖ÷´æÖУ¬¶ÔÓÚËùÓÐÏ̶߳¼Êǹ²ÏíµÄ¡£Ã¿ÌõÏ̶߳¼ÓÐ×Ô¼ºµÄ¹¤×÷Äڴ棨Working Memory£©£¬¹¤×÷ÄÚ´æÖб£´æµÄÊÇÖ÷´æÖÐijЩ±äÁ¿µÄ¿½±´£¬Ï̶߳ÔËùÓбäÁ¿µÄ²Ù×÷¶¼ÊÇÔÚ¹¤×÷ÄÚ´æÖнøÐУ¬Ïß³ÌÖ®¼äÎÞ·¨Ï໥ֱ½Ó·ÃÎÊ£¬±äÁ¿´«µÝ¾ùÐèҪͨ¹ýÖ÷´æÍê³É¡£
¶à¸öÏ̵߳ÄÖ´ÐÐÊDz¢·¢µÄ£¬Ò²¾ÍÊÇÔÚÂß¼Éϓͬʱ”£¬¶ø²»¹ÜÊÇ·ñÊÇÎïÀíÉϵēͬʱ”¡£Èç¹ûϵͳֻÓÐÒ»¸öCPU£¬ÄÇôÕæÕýµÄ“ͬʱ”ÊDz»¿ÉÄܵġ£¶àÏ̺߳ʹ«Í³µÄµ¥Ïß³ÌÔÚ³ÌÐòÉè¼ÆÉÏ×î´óµÄÇø±ðÔÚÓÚ£¬ÓÉÓÚ¸÷¸öÏ̵߳ĿØÖÆÁ÷±Ë´Ë¶ÀÁ¢£¬Ê¹µÃ¸÷¸öÏß³ÌÖ®¼äµÄ´úÂëÊÇÂÒÐòÖ´Ðеģ¬½«»á´øÀ´Ï̵߳÷¶È£¬Í¬²½µÈÎÊÌâ¡£ Íø¹ÜÍøbitsCN.com
¶þ¡¢ÔÚJavaÖÐʵÏÖ¶àÏß³Ì
ÎÒÃDz»·ÁÉèÏ룬ΪÁË´´½¨Ò»¸öеÄỊ̈߳¬ÎÒÃÇÐèÒª×öЩʲô£¿ºÜÏÔÈ»£¬ÎÒÃDZØÐëÖ¸Ã÷Õâ¸öÏß³ÌËùÒªÖ´ÐеĴúÂ룬¶øÕâ¾ÍÊÇÔÚJavaÖÐʵÏÖ¶àÏß³ÌÎÒÃÇËùÐèÒª×öµÄÒ»ÇУ¡
×÷Ϊһ¸öÍêÈ«ÃæÏò¶ÔÏóµÄÓïÑÔ£¬JavaÌṩÁËÀà java.lang.Thread À´·½±ã¶àÏ̱߳à³Ì£¬Õâ¸öÀàÌṩÁË´óÁ¿µÄ·½·¨À´·½±ãÎÒÃÇ¿ØÖÆ×Ô¼ºµÄ¸÷¸öÏ̡߳£
ÄÇôÈçºÎÌṩ¸ø Java ÎÒÃÇÒªÏß³ÌÖ´ÐеĴúÂëÄØ£¿ÈÃÎÒÃÇÀ´¿´Ò»¿´ Thread Àà¡£Thread Àà×îÖØÒªµÄ·½·¨ÊÇ run£¨£© £¬ËüΪThread ÀàµÄ·½·¨ start£¨£© Ëùµ÷Óã¬ÌṩÎÒÃǵÄÏß³ÌËùÒªÖ´ÐеĴúÂ롣ΪÁËÖ¸¶¨ÎÒÃÇ×Ô¼ºµÄ´úÂ룬ֻÐèÒª¸²¸ÇËü£¡
·½·¨Ò»£º¼Ì³Ð Thread À࣬ÖØд·½·¨ run£¨£©£¬ÎÒÃÇÔÚ´´½¨µÄ Thread ÀàµÄ×ÓÀàÖÐÖØд run£¨£© £¬¼ÓÈëÏß³ÌËùÒªÖ´ÐеĴúÂë¼´¿É¡£ÏÂÃæÊÇÒ»¸öÀý×Ó£º
public class TwoThread extends Thread {
public void run() {
for ( int i = 0; i < 10; i++ ) {
&n
Ïà¹ØÎĵµ£º
ÔÌùÄÚÈÝÇë¼û: http://topic.csdn.net/u/20100116/17/6a204504-9e70-435f-be55-f0630ed12fdf.html?seed=942806558&r=62778073#r_62778073
Çë´óÅ£Ö¸Õý.
²úÆ·Àà:
package selfimpr.producerCustomer;
/**
* ²úÆ·
* @author selfimpr
* @blog http://blog.csdn.net/lgg201
* @email lgg860911@yahoo.com.cn
......
public class SHA1 {
private final int[] abcde = {
0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0
};
// ÕªÒªÊý¾Ý´æ´¢Êý×é
&nb ......
ÄÚ²¿Àà
1.ÄÚ²¿ÀàÔÊÐí¶¨Òåstatic³ÉԱô£¿ÎªÊ²Ã´£¿
2.ÄÚ²¿ÀàÓÐûÓжà̬ÐÔ£¿
Òì³£´¦Àí
1.ÅÉÉúÀ๹ÔìÆ÷ÊÇ·ñ»á²¶»ñµ½»ùÀ๹ÔìÆ÷Å׳öµÄÒì³££¿
2.ÈçºÎÓÃÒì³£ÀàµÄinitCause·½·¨ÊµÏÖÒì³£Á´£¿
ÐòÁл¯
1.static³ÉÔ±ÊÇ·ñ»á±»ÐòÁл¯£¿
2.ÊÇ·ñÔÊÐí»ùÀ಻¿ÉÐòÁл¯¶øÅÉÉúÀà¿ÉÐòÁл¯£¿ ......
WindowsÏÂJAVAÓõ½µÄ»·¾³±äÁ¿Ö÷ÒªÓÐ3¸ö£¬JAVA_HOME¡¢CLASSPATH¡¢PATH¡£ÏÂÃæÖð¸ö·ÖÎö¡£
JAVA_HOMEÖ¸ÏòµÄÊÇJDKµÄ°²×°Â·¾¶£¬ÈçC:\jdk1.5.0_06£¬ÔÚÕâ·¾¶ÏÂÄãÓ¦¸ÃÄܹ»ÕÒµ½bin¡¢libµÈĿ¼¡£ÖµµÃÒ»ÌáµÄÊÇ£¬JDKµÄ°²×°Â·¾¶¿ÉÒÔÑ¡ÔñÈÎÒâ´ÅÅÌĿ¼£¬²»¹ý½¨ÒéÄã·ÅµÄĿ¼²ã´Îdzһµã£¬Èç¹ûÄã·ÅµÄĿ¼ºÜÉî£ ......