JavaÖеÄ×Ö·û´®Ò²ÊÇÒ»Á¬´®µÄ×Ö·û¡£µ«ÊÇÓëÐí¶àÆäËûµÄ¼ÆËã»úÓïÑÔ½«×Ö·û´®×÷Ϊ×Ö·ûÊý×é´¦Àí²»Í¬£¬Java½«×Ö·û´®×÷ΪStringÀàÐͶÔÏóÀ´´¦Àí¡£½«×Ö·û´®×÷ΪÄÚÖõĶÔÏó´¦ÀíÔÊÐíJavaÌṩʮ·Ö·á¸»µÄ¹¦ÄÜÌØÐÔÒÔ·½±ã´¦Àí×Ö·û´®¡£ÏÂÃæÊÇһЩʹÓÃƵÂʱȽϸߵĺ¯Êý¼°ÆäÏà¹Ø˵Ã÷¡£
substring()
ËüÓÐÁ½ÖÖÐÎʽ£¬µÚÒ»ÖÖÊÇ£ºString substring(int startIndex)
µÚ¶þÖÖÊÇ£ºString substring(int startIndex,int endIndex)
concat() Á¬½ÓÁ½¸ö×Ö·û´®
replace() Ìæ»»
ËüÓÐÁ½ÖÖÐÎʽ£¬µÚÒ»ÖÖÐÎʽÓÃÒ»¸ö×Ö·ûÔÚµ÷ÓÃ×Ö·û´®ÖÐËùÓгöÏÖij¸ö×Ö·ûµÄµØ·½½øÐÐÌæ»»£¬ÐÎʽÈçÏ£º
String replace(char original,char replacement)
ÀýÈ磺String s=”Hello”.replace(’l',’w');
µÚ¶þÖÖÐÎʽÊÇÓÃÒ»¸ö×Ö·ûÐòÁÐÌæ»»ÁíÒ»¸ö×Ö·ûÐòÁУ¬ÐÎʽÈçÏ£º
String replace(CharSequence original,CharSequence replacement)
trim() È¥µôÆðʼºÍ½áβµÄ¿Õ¸ñ
valueOf() ת»»Îª×Ö·û´®
toLowerCase() ת»»ÎªÐ¡Ð´
toUpperCase() ת»»Îª´óд
length() È¡µÃ×Ö·û´®µÄ³¤¶È
Àý£º
char chars[]={’a',’b’.’c'};
String s=new String(chars);
int len=s.length();
charAt() ½ØÈ¡Ò»¸ ......
»ª½Ü½ÌÓýÊÇÐÂÏç×îרҵµÄÈí¼þʵѵ»ùµØ£¬Ë¼¿ÆÍøÂ繤³Ìʦ¿¼ÊÔÖÐÐÄ¡¢ JAVA¡¢.NET¡¢phpÈí¼þÅàѵÖÐÐÄ¡¢¼ÆËã»úµÈ¼¶¿¼ÊÔÅàѵÖÐÐÄ ÊÇÔ¥±±µØÇø×î´óµÄITÈí¼þ½ÌÓý»ú¹¹£¡
Èí¼þʵѵ£º
¿Î³Ì·ÖΪ.netºÍjavaÁ½¸ö·½Ïò£¬ÓÐʵѵÔç²ÍºÍ¶ÌÆÚÈí¼þÅàѵ£¬
¡¶ÊµÑµÔç²Í¡·ÏîÄ¿£ºÕë¶Ô¼ÆËã»ú¼°Ïà¹Øרҵ´Ó´ó¶þÊð¿ªÊ¼µ½´óËÄ¿ªÑ§½áÊøµÄΪÆÚÒ»ÄêµÄÈí¼þʵѵÏîÄ¿¡£×ÜÌå400¸ö¿Îʱ·ÖÈý¸ö½×¶ÎÊڿΡ£ÕûÌåѧ·Ñ4500Ôª¡£
°´ÒªÇó±ÏÒµµÄѧԱȫ²¿¸ºÔðÍƼöµ½±±¾©£¬ÉϺ££¬Ö£ÖݾÍÒµ¡£Ç©¶©¾ÍÒµ±£ÕÏÐÒé¡£
¿Î³Ì£ºJava·½Ïò£ºJavaÓ﷨֪ʶ£¬UI¹æ»®Éè¼ÆÓëʵÏÖ£¬J2EE¿ª·¢»ù´¡£¬j2EEÈí¼þ¿ª·¢£¬ÏîĿʵս£¬
.net·½Ïò£ºc#ºËÐÄÓï·¨£¬Êý¾Ý½á¹¹ÓëËã·¨£¬c#ÍøÂç±à³Ì£¬vc#»ù±¾Ó¦Óñà³Ì£¬Oracle ......
Java
ÃüÁîÐй¤¾ß×ܽá
1¡¢ÃüÁî
C\Documents and Settings\Zianed>ls ‘%JAVA_HOME%’/bin
HtmlConverter.exe javap.exe jstatd.exe rmid.exe
appletviewer.exe javaw.exe jvisualvm.exe rmiregistry.exe
apt.exe javaws.exe keytool.exe schemagen.exe
beanreg.dll jconsole.exe kinit.exe serialver.exe
extcheck.exe jdb.exe klist.exe servertool.exe
idlj.exe jhat.exe ......
ʹÓÃJava»ñÈ¡IPµØַʵÀý
ÎÄÕ·ÖÀà:Java±à³Ì
ÏÖÔÚÔÚ´ÓÊµĹ¤×÷³öÏÖÁËÒ»¸öÎÊÌ⣬ż¶û»á³öÏÖÈ¡²»µ½ipµÄÇé¿ö£¬ËÑË÷ÁËһϣ¬ÔÀ´ÈçÏÂÎÄËù˵
ת×Ô£ºhttp://developer.51cto.com/art/200906/130491.htm
ʹÓÃJava»ñÈ¡IPµØַʵÀý
ÔÚJSPÀ»ñÈ¡¿Í»§¶ËµÄIPµØÖ·µÄ·½·¨ÊÇ£ºrequest.getRemoteAddr()£¬ÕâÖÖ·½·¨Ôڴ󲿷ÖÇé¿ö϶¼ÊÇÓÐЧµÄ¡£µ«ÊÇÔÚͨ¹ýÁËApache,SquidµÈ·´Ïò´úÀíÈí¼þ¾Í²»ÄÜ»ñÈ¡µ½¿Í»§¶ËµÄÕæʵIPµØÖ·ÁË¡£
¾¹ý´úÀíÒÔºó£¬ÓÉÓÚÔÚ¿Í»§¶ËºÍ·þÎñÖ®¼äÔö¼ÓÁËÖмä²ã£¬Òò´Ë·þÎñÆ÷ÎÞ·¨Ö±½ÓÄõ½¿Í»§¶ËµÄIP£¬·þÎñÆ÷¶ËÓ¦ÓÃÒ²ÎÞ·¨Ö±½Óͨ¹ýת·¢ÇëÇóµÄµØÖ··µ»Ø¸ø¿Í»§¶Ë¡£µ«ÊÇÔÚת·¢ÇëÇóµÄHTTPÍ·ÐÅÏ¢ÖУ¬Ôö¼ÓÁËX£FORWARDED£FORÐÅÏ¢¡£ÓÃÒÔ¸ú×ÙÔÓеĿͻ§¶ËIPµØÖ·ºÍÔÀ´¿Í»§¶ËÇëÇóµÄ·þÎñÆ÷µØÖ·¡£µ±ÎÒÃÇ·ÃÎÊ http://www.5q520.cn /index.jsp/ ʱ£¬Æäʵ²¢²»ÊÇÎÒÃÇä¯ÀÀÆ÷ÕæÕý·ÃÎʵ½ÁË·þÎñÆ÷ÉϵÄindex.jspÎļþ£¬¶øÊÇÏÈÓÉ´úÀí·þÎñÆ÷È¥·ÃÎÊhttp://192.168.1.110:2046 /index.jsp £¬´úÀí·þÎñÆ÷ÔÙ½«·ÃÎʵ½µÄ½á¹û·µ»Ø¸øÎÒÃǵÄä¯ÀÀÆ÷£¬ÒòΪÊÇ´úÀí·þÎñÆ÷È¥·ÃÎÊindex.jspµÄ£¬ËùÒÔindex.jspÖÐͨ¹ý request.getRemoteAddr()µÄ·½·¨»ñÈ¡µÄIPʵ¼ÊÉÏÊÇ´úÀí·þÎñÆ÷µÄµØÖ·£¬²¢²»ÊÇ¿Í»§¶ËµÄIPµØÖ·¡£
ÓÚÊǿɵ ......
ÎÄÖÐjstat²¿·Öת×Ô
http://blog.csdn.net/kozazyh/archive/2010/02/04/5289684.aspx
ÓÃjavaÓïÑÔ±à³ÌµÄʱºò£¬sunÌṩÁ˼¸¸öС¹¤¾ß£¬ÓÃ×Å»¹ÊDz»´íµÄ£¬ÌØÒâ×öÏÂ×ܽá
1.jps
jpsÓÃÀ´²é¿´µ±Ç°javaµÄ½ø³Ì£¬ÆäʵËüµÄ¹¦ÄÜ¿ÉÒÔ»ù±¾ÉÏÓÉpsÀ´ÊµÏÖ
¼¸¸ö³£ÓõIJÎÊý£º
-q Ö»ÏÔʾpid£¬²»ÏÔʾclassÃû³Æ,jarÎļþÃûºÍ´«µÝ¸ømain ·½·¨µÄ²ÎÊý
$
>
jps
-
q
28680
23789
23651
-m Êä³ö´«µÝ¸ømain ·½·¨µÄ²ÎÊý£¬ÔÚǶÈëʽjvmÉÏ¿ÉÄÜÊÇnull
$
>
jps
-
m
28715
Jps
-
m
23789
BossMain
23651
Resin
-
socketwait
32768
-
stdout
/
data
/
aoxj
/
resin
/
log
/
stdout.log
-
stderr
/
data
/
aoxj
/
resin
/
log
/
stderr.log
-l Êä³öÓ¦ÓóÌÐòmain classµÄÍêÕûpackageÃû »òÕß Ó¦ÓóÌÐòµÄjarÎļþÍêÕû·¾¶Ãû
$
>
jps
-
l
28729
sun.tools.jps.Jps
23789
com.asiainfo.aimc.bossbi.BossMain
23651
com.caucho.server.resin.Resin
-v Êä³ö´«µÝ¸øJVMµÄ²ÎÊý
$
>
jps
-
v
23789
......
ÕâÀïתÔØһƪ½²½âjavaÐòÁл¯(Serializable)ºÍ·´ÐòÁл¯·½ÃæµÄ¸Ð¾õºÜºÃµÄÎÄÕ¡£
1¡¢ÐòÁл¯ÊǸÉʲôµÄ£¿
¼òµ¥Ëµ¾ÍÊÇΪÁ˱£´æÔÚÄÚ´æÖеĸ÷ÖÖ¶ÔÏóµÄ״̬£¨Ò²¾ÍÊÇʵÀý±äÁ¿£¬²»ÊÇ·½·¨£©£¬²¢ÇÒ¿ÉÒ԰ѱ£´æµÄ¶ÔÏó״̬ÔÙ¶Á³öÀ´¡£ËäÈ»Äã¿ÉÒÔÓÃÄã×Ô¼ºµÄ¸÷ÖÖ¸÷ÑùµÄ·½·¨À´±£ ´æobject states£¬µ«ÊÇJava¸øÄãÌṩһÖÖÓ¦¸Ã±ÈÄã×Ô¼ººÃµÄ±£´æ¶ÔÏó״̬µÄ»úÖÆ£¬ÄǾÍÊÇÐòÁл¯¡£
2¡¢Ê²Ã´Çé¿öÏÂÐèÒªÐòÁл¯
a£©µ±ÄãÏë°ÑµÄÄÚ´æÖеĶÔÏó״̬±£´æµ½Ò»¸öÎļþÖлòÕßÊý¾Ý¿âÖÐʱºò£»
b£©µ±ÄãÏëÓÃÌ×½Ó×ÖÔÚÍøÂçÉÏ´«ËͶÔÏóµÄʱºò£»
c£©µ±ÄãÏëͨ¹ýRMI´«Êä¶ÔÏóµÄʱºò£»
3¡¢µ±¶ÔÒ»¸ö¶ÔÏóʵÏÖÐòÁл¯Ê±£¬¾¿¾¹·¢ÉúÁËʲô£¿
ÔÚûÓÐÐòÁл¯Ç°£¬Ã¿¸ö±£´æÔڶѣ¨Heap£©ÖеĶÔÏó¶¼ÓÐÏàÓ¦µÄ״̬£¨state£©£¬¼´ÊµÀý±äÁ¿£¨instance ariable£©±ÈÈ磺
java ´úÂë
Foo myFoo = new Foo();
myFoo .setWidth(37);
myFoo.setHeight(70);
µ± ͨ¹ýÏÂÃæµÄ´úÂëÐòÁл¯Ö®ºó£¬MyFoo¶ÔÏóÖеÄwidthºÍHeightʵÀý±äÁ¿µÄÖµ£¨37£¬70£©¶¼±»±£´æµ½foo.serÎļþÖУ¬ÕâÑùÒÔºóÓÖ¿ÉÒÔ°ÑËü ´ÓÎļþÖжÁ³öÀ´£¬ÖØÐÂÔÚ¶ÑÖд´½¨ÔÀ´µÄ¶ÔÏó¡£µ±È»±£´æʱºò²»½ö½öÊDZ£´æ¶ÔÏóµÄʵÀý±äÁ¿µÄÖµ£¬JVM»¹Òª±£´æһЩСÁ¿ÐÅÏ¢£¬±ÈÈçÀàµÄÀàÐ͵ÈÒÔ±ã»Ö¸´ÔÀ´µÄ¶Ô ......