¾ÞÈËÍøÂçjava±ÊÊÔ»ù´¡Ìâ
1¡¢StringÊÇ×î»ù±¾µÄÊý¾ÝÀàÐÍÂð?
»ù±¾Êý¾ÝÀàÐÍ°üÀ¨byte¡¢int¡¢char¡¢long¡¢float¡¢double¡¢booleanºÍshort¡£
java.lang.StringÀàÊÇfinalÀàÐ͵ģ¬Òò´Ë²»¿ÉÒԼ̳ÐÕâ¸öÀà¡¢²»ÄÜÐÞ¸ÄÕâ¸öÀࡣΪÁËÌá¸ßЧÂʽÚÊ¡¿Õ¼ä£¬ÎÒÃÇÓ¦¸ÃÓÃStringBufferÀà
2¡¢int ºÍ Integer ÓÐʲôÇø±ð
Java ÌṩÁ½ÖÖ²»Í¬µÄÀàÐÍ£ºÒýÓÃÀàÐͺÍÔʼÀàÐÍ£¨»òÄÚÖÃÀàÐÍ£©¡£IntÊÇjavaµÄÔʼÊý¾ÝÀàÐÍ£¬IntegerÊÇjavaΪintÌṩµÄ·â×°Àà¡£JavaΪÿ¸öÔʼÀàÐÍÌṩÁË·â×°Àà¡£
ÔʼÀàÐÍ·â×°Àà
booleanBoolean
charCharacter
byteByte
shortShort
intInteger
longLong
floatFloat
doubleDouble
Òý
ÓÃÀàÐͺÍÔʼÀàÐ͵ÄÐÐΪÍêÈ«²»Í¬£¬²¢ÇÒËüÃǾßÓв»Í¬µÄÓïÒå¡£ÒýÓÃÀàÐͺÍÔʼÀàÐ;ßÓв»Í¬µÄÌØÕ÷ºÍÓ÷¨£¬ËüÃÇ°üÀ¨£º´óСºÍËÙ¶ÈÎÊÌ⣬ÕâÖÖÀàÐÍÒÔÄÄÖÖÀàÐ͵ÄÊý
¾Ý½á¹¹´æ´¢£¬µ±ÒýÓÃÀàÐͺÍÔʼÀàÐÍÓÃ×÷ij¸öÀàµÄʵÀýÊý¾ÝʱËùÖ¸¶¨µÄȱʡֵ¡£¶ÔÏóÒýÓÃʵÀý±äÁ¿µÄȱʡֵΪ
null£¬¶øÔʼÀàÐÍʵÀý±äÁ¿µÄȱʡֵÓëËüÃǵÄÀàÐÍÓйء£
3¡¢String ºÍStringBufferµÄÇø±ð
JAVAƽ̨ÌṩÁËÁ½¸ö
ÀࣺStringºÍStringBuffer£¬ËüÃÇ¿ÉÒÔ´¢´æºÍ²Ù×÷×Ö·û´®£¬¼´°üº¬¶à¸ö×Ö·ûµÄ×Ö·ûÊý¾Ý¡£Õâ¸öStringÀàÌṩÁËÊýÖµ²»¿É¸Ä±äµÄ×Ö·û´®¡£¶ø
Õâ¸öStringBufferÀàÌṩµÄ×Ö·û´®½øÐÐÐ޸ġ£µ±ÄãÖªµÀ×Ö·ûÊý¾ÝÒª¸Ä±äµÄʱºòÄã¾Í¿ÉÒÔʹÓÃStringBuffer¡£µäÐ͵أ¬Äã¿ÉÒÔʹÓÃ
StringBuffersÀ´¶¯Ì¬¹¹Ôì×Ö·ûÊý¾Ý¡£
4¡¢ÔËÐÐʱÒì³£ÓëÒ»°ãÒì³£ÓкÎÒìͬ£¿
Òì³£±íʾ³ÌÐòÔËÐйý³ÌÖпÉÄܳöÏֵķÇÕý³£×´Ì¬£¬ÔËÐÐʱÒì³£±íʾÐéÄâ»úµÄͨ³£²Ù×÷ÖпÉÄÜÓöµ½µÄÒì³££¬ÊÇÒ»ÖÖ³£¼ûÔËÐдíÎó¡£java±àÒëÆ÷ÒªÇó·½·¨±ØÐëÉùÃ÷Å׳ö¿ÉÄÜ·¢ÉúµÄ·ÇÔËÐÐʱÒì³££¬µ«ÊDz¢²»ÒªÇó±ØÐëÉùÃ÷Å׳öδ±»²¶»ñµÄÔËÐÐʱÒì³£¡£
5¡¢Ëµ³öServletµÄÉúÃüÖÜÆÚ£¬²¢Ëµ³öServletºÍCGIµÄÇø±ð¡£
Servlet±»·þÎñÆ÷ʵÀý»¯ºó£¬ÈÝÆ÷ÔËÐÐÆäinit·½·¨£¬ÇëÇóµ½´ïʱÔËÐÐÆäservice·½·¨£¬service·½·¨×Ô¶¯ÅÉDzÔËÐÐÓëÇëÇó¶ÔÓ¦µÄdoXXX·½·¨£¨doGet£¬doPost£©µÈ£¬µ±·þÎñÆ÷¾ö¶¨½«ÊµÀýÏú»ÙµÄʱºòµ÷ÓÃÆädestroy·½·¨¡£
ÓëcgiµÄÇø±ðÔÚÓÚservlet´¦ÓÚ·þÎñÆ÷½ø³ÌÖУ¬Ëüͨ¹ý¶àÏ̷߳½Ê½ÔËÐÐÆäservice·½·¨£¬Ò»¸öʵÀý¿ÉÒÔ·þÎñÓÚ¶à¸öÇëÇ󣬲¢ÇÒÆäʵÀýÒ»°ã²»»áÏú»Ù£¬¶øCGI¶Ôÿ¸öÇëÇ󶼲úÉúеĽø³Ì£¬·þÎñÍê³Éºó¾ÍÏú»Ù£¬ËùÒÔЧÂÊÉϵÍÓÚservlet¡£
6¡¢Ëµ³öArrayList,Vector, LinkedListµÄ´æ´¢ÐÔÄܺÍÌØÐÔ
ArrayList
ºÍVector¶¼ÊÇʹÓÃÊý×鷽ʽ´æ´¢Êý¾Ý£¬´ËÊý×éÔªËØÊý´óÓÚʵ¼Ê´æ´¢µÄÊý¾ÝÒÔ±ãÔö¼ÓºÍ²åÈëÔªËØ£¬ËüÃǶ¼ÔÊÐíÖ±½Ó°
Ïà¹ØÎĵµ£º
Ç°¶Îʱ¼ä¹«Ë¾¿ªÊ¼ÓÃSSH¿ò¼Ü£¬ÒòΪÒÔǰûÓÐÓùý£¬Ï¸ö¼¸¸ödemo¿´¿´£¬·¢ÏÖÏëÀí½âStructs2µÄÁ÷³ÌÕæÊÇÀ§ÄÑ£»ºóÀ´ÓÖÏëÕûºÏExt½øÐнçÃ濪·¢£¬ÉÏÍøÕÒ×ÊÁÏ£¬·¢ÏÖÓÃStructsÕûºÏAjax»¹ÕæÊÇÂé·³£¬²»½öǰ̨Ҫ×öÐ޸ģ¬ºǫ́»¹Òª¸ÄÅäÖÃÎļþÒÔ¼°actionÀ࣬Õæ²»ÖªµÀÕâÑùµÄ¶«Î÷×öÍêÁ˸ÃÔõôÑùȥά»¤£¡¼ÌÐøÔÚÍøÉÏÕÒÖÕÓÚ±»ÎÒ·¢ÏÖÁËVraptor£¬¸Ã¿ò ......
1¡¢ÀàµÄÐÞÊηû·ÖΪ£º¿É·ÃÎÊ¿ØÖÆ·ûºÍ·Ç·ÃÎÊ¿ØÖÆ·ûÁ½ÖÖ¡£
¿É·ÃÎÊ¿ØÖÆ·ûÊÇ£º¹«¹²ÀàÐÞÊηû public
·Ç·ÃÎÊ¿ØÖÆ·ûÓУº³éÏóÀàÐÞÊηû abstract £»×îÖÕÀàÐÞÊηû final
1 £©¹«¹²ÀàÐÞÊηû public £º Java ÓïÑÔÖÐÀàµÄ¿É·ÃÎÊ¿ØÖÆ·ûÖ»ÓÐÒ»¸ö£º public ¼´¹«¹²µÄ¡£Ã¿¸ö Java ³ÌÐòµÄÖ÷À඼±ØÐëÊÇ public Àà×÷Ϊ¹«¹²¹¤¾ß¹©ÆäËüÀàºÍ³ÌÐòÊ¹Ó ......
Ò»¡¢±ÜÃâÔÚÑ»·Ìõ¼þÖÐʹÓø´ÔÓ±í´ïʽ
ÔÚ²»×ö±àÒëÓÅ»¯µÄÇé¿öÏ£¬ÔÚÑ»·ÖУ¬Ñ»·Ìõ¼þ»á±»·´¸´¼ÆË㣬Èç¹û²»Ê¹Óø´ÔÓ±í´ïʽ£¬¶øʹѻ·Ìõ¼þÖµ²»±äµÄ»°£¬³ÌÐò½«»áÔËÐеĸü¿ì¡£
Àý×Ó£º
import java.util.Vector;
class CEL {
void method (Vector vector) {
......
cd /usr/lib/jvm/java
-1.5.0-sun-1.5.0.15/jre/lib/fonts
sudo mkdir fallback
cd fallback
sudo cp /usr/share/fonts/truetype/arphic/uming.ttc /usr/lib/jvm/java
-1.5.0-sun-1.5.0.15/jre/lib/fonts/fallback
sudo mkfontdir
sudo mkfontscale ......