Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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»Í¬µÄ


Ïà¹ØÎÊ´ð£º

tomcat»·¾³ÏÂjsp±àÒë´íÎó£¬Çó½â£¡ - Java / Web ¿ª·¢

org.apache.jasper.JasperException: Unable to compile class for JSP: 
An error occurred at line: 52 in the jsp file: /vip_info.jsp
ÕË cannot be resolved
49: <table border="1& ......

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

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

ÓÃzip ......

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

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

javaÖд«Öµ - Java / Web ¿ª·¢

ÔõôÑù½«id´«¹ýÈ¥°¡£¿£¿£¿ÊǼòµ¥µÄ´«¡£¡£¡£ÔÚµØÖ·À¸ÖÐдidºÅ
LZ ºÃÓÄĬ£¡²»ÖªµÀÄãµÄÒâ˼£¿

ÊÇÏë°ÑID ´«µ½ACTION ? ͨ¹ýURl id=?

²»¹»Ïêϸ ±ðÈ˲»ÖªµÀÔõÑù°ïÄã

../XXXXX.do?id=XXXX&id2=XXXXX

......

mysqlµÄ¸üÐÂÓï¾ä - Java / Java SE

id name datetime
1 a 2010-05-13 10:15:00
2 b 2010-05-14 09:10:00
3 d 2010-05-14 10:10:00
ÈçºÎ½«¾àÀëÄ¿Ç°×î½üµÄÄǸö¼Ç¼µÄname ¸üÐÂΪ¡°x¡±ÄØ
лл¿© °¡ ºÇºÇ
update table_n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ