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

javaº¯ÊýµÄ²ÎÊý´«µÝºÍStringÀàÐÍ

ÒÔÏÂÄÚÈÝÕª×Ôjavaº¯ÊýµÄ²ÎÊý´«µÝºÍStringÀàÐÍ http://www.blogjava.net/thuixy/archive/2009/06/06/280302.html
˵ÍêÁËjavaµÄStringÀàÐÍ£¬ÎÒÃÇ×îºó¿´¿´javaº¯Êý²ÎÊýµÄ´«µÝ£¬µ½µ×ÊÇÖµ´«µÝ»¹ÊÇÒýÓô«µÝÄØ£¿Ò»°ãµÄ˵·¨ÊǶÔÓÚ»ù±¾ÀàÐͱÈÈçint¡¢charÊÇÖµ´«µÝ£¬¶ÔÓÚ¶ÔÏóÀàÐÍÊÇÒýÓô«µÝ¡£ÕâÖÖ˵·¨Ã»´í£¬µ«ÊÇÇë¿´ÏÂÃæµÄÀý×Ó£º
String s=”abc”;
change(s);
System.out.println(s);
public void change(String str)
{
     str=”abcd”;
}
ÉÏÃæµÄ³ÌÐò»áÓÐʲô½á¹ûÄØ£¿´òÓ¡abc»¹ÊÇabcd£¬ÔËÐгÌÐò»á·¢ÏÖ´òÓ¡µÄÊÇabc£¬ÍêÁË£¬Ëƺõ²»ºÏºõ³£Àí£¬°´Àí˵String Ò²ÊǶÔÏó£¬Ó¦¸ÃÊÇÒýÓô«µÝ²Å¶Ô°¡£¬ÓеÄͬѧ֪µÀjavaµÄStringÀàÐÍÊDz»¿É±äÀàÐÍ£¬»áµÃ³ö½á¹ûabc£¬¾ßÌå½âÊÍÊÇString¾ÍÏ൱ÓÚÊÇchar[]µÄ°ü×°Àà¡£°ü×°ÀàµÄÌØÖÊÖ®Ò»¾ÍÊÇÔÚ¶ÔÆäÖµ½øÐвÙ×÷ʱ»áÌåÏÖ³öÆä¶ÔÓ¦µÄ»ù±¾ÀàÐ͵ÄÐÔÖÊ¡£ÔÚ²ÎÊý´«µÝʱ£¬°ü×°Àà¾ÍÊÇÈç´ËÌåÏֵġ£ËùÒÔ£¬¶ÔÓÚStringÔÚÕâÖÖÇé¿öϵÄÕ¹ÏÖ½á¹ûµÄ½âÊ;Í×ÔÈ»¶øÈ»µÃ³öÁË¡£Í¬ÑùµÄ£¬Integer¡¢FloatµÈÕâЩ°ü×°ÀàºÍStringÔÚÕâÖÖÇé¿öϵıíÏÖÊÇÏàͬµÄ¡£ÏÂÃæ´Óº¯Êý²ÎÊý´«µÝµÄ·½Ê½À´Àí½âÒ²¿ÉÒԵóöÏàͬµÄ½á¹û¡£
javaµÄ²ÎÊý´«µÝ±¾ÖÊÉ϶¼¿ÉÒÔÈÏΪÊÇÖµ´«µÝ£¬¶Ô»ù±¾ÀàÐÍ×ÔÈ»²»±Ø˵£¬¶ÔÓÚ¶ÔÏóÀàÐÍ£¬´«µÝµÄÊǶÔÏóµÄµØÖ·£¬µØÖ·ÊǸöÊý×Ö£¬Ò²ÊÇ»ù±¾ÀàÐÍ£¬ËùÒÔÒ²»¹ÊÇÖµ´«µÝµÄ£¬ ÓÐÁËÕâ¸ö»ù´¡£¬ÉÏÃæµÄÌâÄ¿¿ÉÒÔÕâÑùÀí½â£¬sÊÇ×Ö·û´®abcµÄµØÖ·£¬µ÷ÓÃchange·½·¨Ê±£¬°ÑsµÄ¿½±´¸³¸østr£¬¼´strÒ²Ö¸Ïòabc£¬µ«ÊÇÔÚ·½·¨ÀïÓÖ°ÑstrÖ¸Ïòabcd£¬str¾ÍÊÇabcdµÄµØÖ·ÁË£¬µ«ÊÇs»¹ÊÇÖ¸ÏòµÄabc¡£


Ïà¹ØÎĵµ£º

ubntuÏÂjavaÖÐÎÄÂÒÂë½â¾ö

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 ......

LinuxÅäÖÃjava¿ª·¢Æ½Ì¨

LinuxÅäÖÃjava¿ª·¢Æ½Ì¨
Ò»¡¢°²×°jdk
1.ÏÂÔØ°²×°jdk
£¨1£©¡¢Ê×ÏÈ£¬ÔÚhttp://java.sun.com
ÕÒµ½ÒªÏÂÔصÄjdk£¬ÏÂÔØ×Ô¼ºÐèÒªµÄjdk°æ±¾¡£ÎÒÕâÀïʹÓõÄÊÇjdk6£¬µÃµ½µÄÊÇÒ»¸öÃûΪjdk-6u6-linux-i586-rpm.binµÄÎļþ¡£´ËÎļþµ±Ç°Îª²»¿ÉÔËÐеÄshell script¡£
£¨2£©¡¢¸ü¸ÄȨÏÞ£¬ÌáÈ¡jdk°²×°Îļþ£º
   ´ò¿ªÖÕ¶ËÔËÐ ......

Javaµ÷ÓÃLinuxÃüÁîÐÐÈô¸ÉʵÀý

 Executing a CommandSee also e90 Reading Output from a Command.
try {
// Execute a command without arguments
String command = "ls";
Process child = Runtime.getRuntime().exec(command);

// Execute a command with an argument
command = "ls /tmp"; ......

ÓÅ»¯Java¶¯»­±à³ÌÖеÄÏÔʾЧ¹û

Java¶¯»­±à³ÌÓжàÖÖʵÏÖ·½·¨£¬µ«ËüÃÇʵÏֵĻù±¾Ô­ÀíÊÇÒ»ÑùµÄ£¬¼´ÔÚÆÁÄ»ÉÏ»­³öһϵÁеÄÖ¡À´Ôì³ÉÔ˶¯µÄ¸Ð¾õ¡£Java¶àÏ̼߳¼ÊõÊÇJava¶¯»­±à³ÌÖÐÆÕ±éÔËÓõļ¼Êõ£¬ËüÔÚ¿ØÖƶ¯»­³ÌÐòµÄÁ÷³ÌºÍ¶¯»­µÄÏÔʾЧ¹û·½ÃæÆð×ÅÖØÒªµÄ×÷Óá£Java¶¯»­±à³ÌÖеĶ¯»­ÉÁ˸ºÍͼÏñ²Ðȱ²»È«µÈÏÖÏó£¬ÊÇJava³ÌÐòÔ±¾­³£Óöµ½µÄÎÊÌâ¡£±¾ÎÄÒÔ×÷ÕßÓ¦ÓÃʵÀý³ÌÐò ......

Ãô½Ý¿ª·¢Öбàд¸ßÖÊÁ¿Java´úÂë

Ãô½Ý¿ª·¢µÄÀíÄîÒѾ­Á÷ÐÐÁ˺ܳ¤µÄʱ¼ä£¬ÔÚÃô½Ý¿ª·¢ÖеĿª·¢µü´ú½×¶ÎÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÎå¸ö²½Ö裬À´ÓÐЧµÄÌá¸ßÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿¡£
JavaÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÓÉÓÚ¿ª·¢ÈËÔ±µÄ¾­Ñé¡¢Java´úÂë±àдϰ¹ß£¬ÒÔ¼°È±·¦Í³Ò»µÄ±ê×¼ºÍ¹ÜÀíÁ÷³Ì£¬ÍùÍùµ¼ÖÂÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿½Ï²î£¬ÄÑÓÚά
»¤£¬ÐèÒª½Ï´óµÄ²âÊÔͶÈëºÍÖÜÆÚµÈÎÊÌâ¡£ÕâЩÎÊÌâÔÚÒ»¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ