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

Win7ϵͳÏÂJava»·¾³±äÁ¿µÄÅäÖÃ

win7ϵͳÏÂJava»·¾³±äÁ¿µÄÅäÖà       Jdk°æ±¾Îª1.6
´ò¿ª¿ØÖÆÃæ°å->Óû§ÕÊ»§->¸ü¸ÄÎҵĻ·¾³±äÁ¿
±äÁ¿Ãû£ºJAVA_HOME
±äÁ¿Öµ£ºD:\Program Files\Java\jdk1.6.0_12(ÕâÖ»ÊÇÎÒµÄJDK°²×°Â·¾¶)
±äÁ¿Ãû£ºPath
ÔÚ±äÁ¿ÖµµÄ×îÇ°Ãæ¼ÓÉÏ£º%JAVA_HOME%\bin;£¨ÈôÒѾ­ÓÐPathÏÎÞÐëÁíÍâн¨£¬Ö±½ÓÔÚºó
Ãæ¼Ó£¬µ«ÐèÓÃ;ÓëÇ°ÃæÒÑÓеÄÏî·Ö¸ô¿ª£©
±äÁ¿Ãû£ºCLASSPATH
±äÁ¿Öµ£º.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
×îºó²âÊÔһϻ·¾³±äÁ¿ÊÇ·ñÉèÖóɹ¦
ÔËÐР ->cmd
»Ø³µ
ÊäÈëjavac
Èç¹û³öÏÖÈçÏÂÐÅÏ¢
Ó÷¨£ºjavac <Ñ¡Ïî> <Ô´Îļþ>
ÆäÖУ¬¿ÉÄܵÄÑ¡Ïî°üÀ¨£º
-g                           Éú³ÉËùÓе÷ÊÔÐÅÏ¢
-g:none                      ²»Éú³ÉÈκε÷ÊÔÐÅÏ¢
-g:{lines,vars,source}       Ö»Éú³ÉijЩµ÷ÊÔÐÅÏ¢
-nowarn                      ²»Éú³ÉÈκξ¯¸æ
-verbose                     Êä³öÓйرàÒëÆ÷ÕýÔÚÖ´ÐеIJÙ×÷µÄÏûÏ¢
-deprecation                 Êä³öʹÓÃÒѹýʱµÄ API µÄԴλÖÃ
-classpath <·¾¶>              Ö¸¶¨²éÕÒÓû§ÀàÎļþµÄλÖÃ
-cp <·¾¶>                     Ö¸¶¨²éÕÒÓû§ÀàÎļþµÄλÖÃ
-sourcepath <·¾¶>             Ö¸¶¨²éÕÒÊäÈëÔ´ÎļþµÄλÖÃ
-bootclasspath <·¾¶>          ¸²¸ÇÒýµ¼ÀàÎļþµÄλÖÃ
-extdirs <Ä


Ïà¹ØÎĵµ£º

ʹÓÃjavaÖÐµÄ synchronized½øÐÐÏß³Ìͬ²½

ÔÚjava±à³Ì˼ÏëÖжÔsynchronizedµÄÒ»µã½âÊÍ:
1¡¢synchronized¹Ø¼ü×ÖµÄ×÷ÓÃÓòÓжþÖÖ£º
1£©ÊÇij¸ö¶ÔÏóʵÀýÄÚ£¬synchronized aMethod(){}¿ÉÒÔ·ÀÖ¹¶à¸öÏß³Ìͬʱ·ÃÎÊÕâ¸ö¶ÔÏóµÄsynchronized·½·¨£¨Èç¹ûÒ»¸ö¶ÔÏóÓжà¸ösynchronized·½·¨£¬Ö»ÒªÒ»¸öÏ̷߳ÃÎÊÁËÆäÖеÄÒ»¸ösynchronized·½·¨£¬ÆäËüÏ̲߳»ÄÜͬʱ·ÃÎÊÕâ¸ö¶ÔÏóÖÐÈκÎÒ»¸ö ......

´Ó½ñÌ쿪ʼ£¬°Ñjava´ÓÍ·ÖÁβºÃºÃµÄÊáÀíÒ»±é£¡

ѧjavaÒ²½«½ü¿ìÁ½ÄêµÄʱ¼äÁË£¬Ö®Ç°Ñ§¹ýµÄ¶«Î÷×Ô¼º¸Ð¾õÓеãÄ£ºý£¬ÀíÂÛÕÆÎյIJ»ÊǺÜ͸³¹£¬ÓÐЩÎÊÌâ½â¾öµÄÒ²²»ÊǺÜÈ«Ã棬Ϊ´ËÔÚ´óѧ±ÏҵǰϦ£¬Ïë°Ñ֪ʶºÃºÃµÄÊáÀíһϣ¬°Ñ×Ô¼º¶Ô¼¼ÊõµÄÒɵãºÍһЩÑо¿ÐĵÃдµ½csdn²©¿ÍÉÏ¡£ ......

Ò»´ÎÐÔÀíÇåjava ÖÐµÄ Àà¡¢³éÏóÀà¡¢½Ó¿Ú¡¢¼Ì³Ð¡¢¶ÔÏó

ÀàÊǹ㷺µÄ¸ÅÄ±íʾһ¸öÓй²Í¬ÐÔÖʵÄȺÌå¡£È磺ÈËÀà¡£
´úÂ룺
       // ÉùÃ÷Ò»¸öÀà“Human”
            class Human{
            priv ......

javaÖжѣ¨heap)ºÍ¶ÑÕ»£¨stack)ÓÐʲôÇø±ð

//ת×Ôhttp://pterodactyl.javaeye.com/blog/345892
stack ºÍ heep ¶¼ÊÇÄÚ´æµÄÒ»²¿·Ö
stack ¿Õ¼äС£¬ËٶȱȽϿ죬 ÓÃÀ´·Å¶ÔÏóµÄÒýÓÃ
heep ´ó£¬Ò»°ãËùÓд´½¨µÄ¶ÔÏ󶼷ÅÔÚÕâÀï¡£
Õ»(stack):ÊÇÒ»¸öÏȽøºó³öµÄÊý¾Ý½á¹¹,ͨ³£ÓÃÓÚ±£´æ·½·¨(º¯Êý)ÖеIJÎÊý,¾Ö²¿±äÁ¿.
ÔÚjavaÖÐ,ËùÓлù±¾ÀàÐͺÍÒýÓÃÀàÐͶ¼ÔÚÕ»Öд洢.Õ»ÖÐÊý¾ÝµÄÉ ......

javaʱ¼äÈÕÆÚ´¦ÀíDateÀࣨ2£©

ÀàÃû£º
    java.util.Date
¹¹Ôì·½·¨£º
¹¹Ôì·½·¨ ½â˵
Date()
ÎÞ²ÎÊýµÄ¹¹Ôì·½·¨£¬½«¹¹½¨Ò»¸ö±£³Öµ±Ç°ÈÕÆÚ.ʱ¼äµÄDate¶ÔÏó¡£
Date(long time)
²ÎÊýΪ1970Äê1ÔÂ1ÈÕ00ʱ00·Ö00ÃëÆðËù¾­¹ýµÄºÁÃëÊý£¬½«¹¹½¨Ò»¸ö±£³Ö¸ÃÈÕÆÚ.ʱ¼äµÄ¾«È·µ½ºÁÃëµÄDate¶ÔÏó¡£
ÆäËûÓÐЩ¹¹Ôì·½·¨ÒѾ­²»ÍƼöʹÓã¬ÕâÀï² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ