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

java synchronized - Java / Java SE

Java code:

......
synchronized(user){
int loginNum = Integer.parseInt(Main_Client_Dia.jtf2.getText().trim());
Main_Client_Dia.jtf2.setText("");
loginNum++;
Main_Client_Dia.jtf2.setText(loginNum+"");
}
......



¼¸°Ù¸öÏß³Ìͬʱ·ÃÎÊÉÏÃæµÄ´úÂë
Ϊʲô ÎÞ·¨ ʵÏÖͬ²½ÄØ
Main_Client_Dia.jtf2.setTextµÄֵʱÓÐʱ»á²»ÊÇÏëÒªµÄ½á¹û£¬
ûÌåÑé¹ýÉÏ°Ù¸öÏ̷߳ÃÎÊ£¡£¡

ÎÒ¾õµÃÓ¦¸ÃÊǶÔÏóuser²»ÄÜʵÏÖ£¡£¡

Äã°ÑÀ¨ºÅºÍÀïÃæµÄuserÈ¥µôÊÔÊÔ

Ê×ÏÈÄãҪȷ¶¨Äãÿһ¸öÏß³ÌÖеÄuserÊÇͬһ¸ö¶ÔÏó.Èç¹û²»ÊÇͬһ¸ö¶ÔÏóÒ²¾ÍûÓÐÒâÒåÁË!

¶¥
ÒýÓÃ
Ê×ÏÈÄãҪȷ¶¨Äãÿһ¸öÏß³ÌÖеÄuserÊÇͬһ¸ö¶ÔÏó.Èç¹û²»ÊÇͬһ¸ö¶ÔÏóÒ²¾ÍûÓÐÒâÒåÁË!


ÒýÓÃ
Ê×ÏÈÄãҪȷ¶¨Äãÿһ¸öÏß³ÌÖеÄuserÊÇͬһ¸ö¶ÔÏó.Èç¹û²»ÊÇͬһ¸ö¶ÔÏóÒ²¾ÍûÓÐÒâÒåÁË!

ÿ¸öuser¶ÔÏóÊÇͨ¹ý¹¹Ô캯Êý´«½øÀ´µÄ£¬Ã¿¸öÏ̵߳Äuser¶ÔÏóÊDz»Í¬µÄ

¶øÇÒ£¬ int loginNum = Integer.parseInt(Main_Client_Dia.jtf2.getText().trim());
¾­³£³ö´í£¬Ìáʾ˵Main_Client_Dia.jtf2.getText().trim()µÃµ½µÄֵΪ"";

ÒýÓÃ
ÒýÓà 3 Â¥ xiao_kan_hong_chen µÄ»Ø¸´:
Ê×ÏÈÄãҪȷ¶¨Äãÿһ¸öÏß³ÌÖеÄuserÊÇͬһ¸ö¶ÔÏó.Èç¹û²»ÊÇͬһ¸ö¶ÔÏóÒ²¾ÍûÓÐÒâÒåÁË!

ÿ¸öuser¶ÔÏóÊÇͨ¹ý¹¹Ô캯Êý´«½øÀ´µÄ£¬Ã¿¸öÏ̵߳Äuser¶ÔÏóÊDz»Í¬µÄ


Ïà¹ØÎÊ´ð£º

javaÈÕÆÚ´¦Àí - Java / Java SE

µ±ÖªµÀÒ»¸öÈÕÆÚ£¬ÈçºÎ°ÑÕâ¸öÈÕÆÚËùÔÚÑ®µÄÇ°ºóÁ½¸öÈÕÆÚÈ¡³ö
±ÈÈçÊäÈë20090905£¬¾ÍÊäÈë20090901 20090910
Êä³ö20090901 20090910

È¡µÃÌìÊýºó×÷Ò»ÏÂÅжÏÔÙ°ÑÕâ¸ö·½·¨ÓÃÏÂvoid set(int field, int value)  
......

java swing ³ÌÐòÈçºÎ´ò°ü - Java / JavaÏà¹Ø

java swing ³ÌÐòÈçºÎ´ò°ü³Éjar£¬È»ºó¿ÉÒÔͨ¹ýÅú´¦ÀíÎļþbatÖ±½ÓÔËÐУ¬ÓÐûÓÐʲô¹¤¾ßÖ±½Ó¿ÉÒÔÍê³ÉÕâÁ½¸ö¹¤×÷£¿
ÓÃjar´ò°ü£¬°ÑÔËÐÐÐèÒªµÄjar¿½±´µ½Ò»¸öĿ¼£¬Åú´¦ÀíÓà start javaw -cp .;ÆäËû°ü·¾¶ ÔËÐÐ

ÓÃzip ......

javaÖеÄ×¢½â¿ÉÒÔÓÐÄÄЩ£¿ - Java / Java EE

È磺 @superwaring("unchecked");
Õâ¸öÀïÃ涼¿ÉÒÔÈ¡ÄÄЩֵ°¡£¬»¹ÓÐÀàËÆµÄ @superwaring±êÇ©ÓÐÄÄЩ°¡
ûÓùý¡£¡£

¿´jeeµÄapi
javax.persistenceÀï
@superwaring("unchecked");Ö»ÊǺöÂÔ ......

c/sºÍb/sÖ®¼äÔõôͨѶ. - Java / Web ¿ª·¢

ÔھƵê¹ÜÀíϵͳÖÐ,ÓÐÒ»¸ö¶ÔÄÚµÄϵͳ,¹©Ç°Ì¨·þÎñÔ±ºÍ¾­ÀíʹÓÃ
»¹ÓÐÒ»¸ö¾ÍÊǶÔÍâ,Èÿͻ§¿ÉÒÔÔÚÍøÉÏÔ¤¶©·¿¼ä,
ËüÃÇÖ®¼äÊÇÔõôͨѶµÄ.?µ±ÎÒÌá½»Ô¤¶©·¿¼äÐÅÏ¢µÄʱºò,
ÔÚ¶ÔÄÚµÄϵͳÖÐ,ÈçºÎÖªµÀÎÒÒѾ­Ìá½»ÁËÐÅÏ¢¹ýÈ¥.Ê¹Ç ......

jspºÍtomcatÎÊÌ⣬¿ì·èÁË - Java / Java EE

ÎÒдÁ˸öjspÒ³Ã棬Ȼºó¸Ä¶¯ÁËһϣ¬¸Ä¶¯µÄÄÚÈݾÍÊÇÔÚjspÒ³ÃæµÄjsº¯ÊýÀï¼ÓÁ˸öalert()Óï¾ä£¬µ«ÊÇÎÒ·ÃÎÊÕâ¸öÒ³Ãæʱ£¬ËÀ»î¶¼ÊÇÔ­À´Ò³ÃæµÄÄÚÈÝ£¬ÎÒ¼ÓÁ˺ܶàalertº¯Êý»¹ÊÇû¸Ä¶¯Ç°µÄÒ³ÃæÄÚÈÝ£»tomcatÖØÆôÁË£¬Ò²ÖØв¿ÊðÕâ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ