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

JAVAµÄ²ÎÊý´«µÝ»úÖÆ

²ÎÊý´«µÝ»úÖÆÖ÷ÒªÓÐÁ½ÖÖ£ºÖµµ÷ÓÃ(call-by-value)£¬ÒýÓõ÷ÓÃ(call-by-reference)¡£
Öµµ÷ÓÃ(call-by-value)£º»á¶ÔʵÔÚ²ÎÊýÇóÖµ£¨Èç¹ûÊDZí´ïʽ£©»ò¿½±´£¨Èç¹ûÊDZäÁ¿£©¡£ÕâЩֵ±»·ÅÔÚÊôÓÚ±»µ÷Óùý³ÌµÄÏìÓ¦ÐÎʽ²ÎÊýµÄÄÚ´æλÖÃÉÏ¡£
ÒýÓõ÷ÓÃ(call-by-reference)£ºÊµÔÚ²ÎÊýµÄµØÖ·×÷ΪÏàÓ¦µÄÐÎʽ²ÎÊýµÄÖµ±»´«µÝ¸ø±»µ÷ÓÃÕß¡£ÔÚ±»µ÷ÓÃÕߵĴúÂëÖÐʹÓÃÐÎʽ²ÎÊýʱ£¬ÊµÏÖ·½·¨ÊÇÑØ×ÅÕâ¸öÖ¸ÕëÕÒµ½µ÷ÓÃÕßÖ¸Ã÷µÄÄÚ´æλÖá£Òò´Ë£¬¸Ä±äÐÎʽ²ÎÊý¾ÍÏñ¸Ä±äÁËʵÔÚ²ÎÊýÒ»Ñù¡£C++¾ÍÊÇÓõÄÒýÓõ÷Óá£
¿´ÉÏÈ¥JAVAµÄµ÷ÓÃÒ²·Â·ðÊÇÒýÓõ÷Ó㬶øÖ±µ½×î½ü£¬ÎÒ²ÅŪÃ÷°×£¬Ô­À´JAVAÊÇÖµµ÷Óõġ£Ò²¾ÍÊÇ˵£¬µ±JAVA³ÌÐòÀïµÄʵÔÚ²ÎÊýÊDZäÁ¿Ê±£¨·Ç±í´ïʽ£©£¬º¯Êý»áΪʵÔÚ²ÎÊý¸´ÖÆÒ»¸ö±äÁ¿¸øÐÎʽ²ÎÊý£¬¸Ã±äÁ¿µÄÖ¸ÕëÓëʵÔÚ²ÎÊýµÄÖ¸ÕëÒ»Ñù£¬¶¼Ö¸ÏòÁËʵÔÚ²ÎÊýËù¶ÔÓ¦µÄÄÚ´æµØÖ·£¬¼´¶ÔÏ󡣶øÔÚº¯ÊýÄÚ²¿ÐÞ¸ÄÐÎʽ²ÎÊýËù¶ÔÓ¦µÄ¶ÔÏóµÄÖµµÄʱºò£¬Æäʵ¾ÍÊÇÐÞ¸ÄÁËʵÔÚ²ÎÊýËùÖ¸ÏòµÄÄǸö¶ÔÏó£¬Ò²¾ÍÊÇ˵ËûÃÇÖ¸Ïòͬһ¸ö¶ÔÏó¡£µ«£¬¼ÙÈçÔÚº¯ÊýÄÚ²¿¸Ä±äÁ˶ÔÐÎʽ²ÎÊýµÄÒýÓ㬱ÈÈ罫ÐÎʽ²ÎÊýµÄÒýÓÃÖ¸ÏòÁËÁíÒ»¸ö¶ÔÏ󣬴Ëʱº¯Êý¶ÔÐÎʽ²ÎÊýËùÖ¸¶ÔÏóµÄÐ޸ľͱä³ÉÁ˶ÔжÔÏóµÄÐ޸ģ¬¶øʵ¼Ê²ÎÊýËùÖ¸ÏòµÄ¶ÔÏó²¢Ã»Óиı䡣¼òµ¥µã˵£¬¾ÍÊÇ£ºÎÞÂÛÊÇ·ñÔÚº¯ÊýÄÚ½«ÐÎʽ²ÎÊýµÄÒýÓøı䣬ʵ¼Ê²ÎÊýµÄÒýÓö¼²»»á¸Ä±ä¡£
JAVA±àÒëÆ÷ͨ¹ý¶Ô±äÁ¿ÒýÓõķ½Ê½£¬ÊµÏÖÁËÒýÓõ÷ÓõŦÄÜ£¬ÓõÄÈ´ÊÇÖµµ÷Óã¬ÒÔÖÁÓÚµ±±äÁ¿±»´«µÝ¸øº¯Êýµ÷Óú󣬲»ÂÛʲôÇé¿ö£¬¸Ã±äÁ¿ËùÖ¸µÄ¶ÔÏó²»»á±ä¡£
ÏÂÃæµÄ³ÌÐò¼òµ¥µØÖ¤Ã÷ÁËÒÔÉϵĵ÷ÓûúÖÆ¡£
private static int[] argumentTest(int[] input){

System.out.println("here come the input's items :");
for (int i : input)
System.out.print(i + " ");
System.out.println();

input = new int[]{1,2,3};

System.out.println("the input's reference has been changed here, you can see the current input's items :");
for (int i : input)
System.out.print(i + " ");
System.out.println();

return input;
}

public static void main(String[] args) {

int[] input = new int[]{3,2,1};

int[] output = argumentTest(input);

System.out.println("the input's reference has been changed in function argumentTest,but out of the function, the input remains the same as the one before invoked by argumentTest :");


Ïà¹ØÎĵµ£º

linux java/jsp »ñȡϵͳµ±Ç°Ê±¼äÎÊÌâ

JSPÔ´´úÂë
 <%
   //»ñȡϵͳʱ¼ä
   //String ddate=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime());
   TimeZone tz = TimeZone.getTimeZone("ETC/GMT-8"); 
    TimeZone.setDefault(tz);
    ......

javaÈÕÆÚ´¦Àí

 ×ª£º http://hi.baidu.com/jiong0818/blog/item/93f9b21641294b4d20a4e971.html JavaÖÐÈÕÆÚ¸ñʽת»» /** * ×Ö·û´®×ª»»Îªjava.util.Date
* Ö§³Ö¸ñʽΪ yyyy.MM.dd G 'at' hh:mm:ss z Èç '2002-1-1 AD at 22:10:59 PSD'
* yy/MM/dd HH:mm:ss Èç '2002/1/1 17:55:00'
* yy/MM/dd HH:mm:ss pm Èç '2002/1/1 17:55:00 p ......

Java ¶ÁдExcelÎļþ £¨¶þ£©

JAVA EXCEL API¼ò½é
Java ExcelÊÇÒ»¿ª·ÅÔ´ÂëÏîÄ¿£¬Í¨¹ýËüJava¿ª·¢ÈËÔ±¿ÉÒÔ¶ÁÈ¡ExcelÎļþµÄÄÚÈÝ¡¢´´½¨ÐµÄExcelÎļþ¡¢¸üÐÂÒѾ­´æÔÚµÄExcelÎļþ¡£Ê¹ÓøÃAPI·ÇWindows²Ù×÷ϵͳҲ¿ÉÒÔͨ¹ý´¿JavaÓ¦ÓÃÀ´´¦ÀíExcelÊý¾Ý±í¡£ÒòΪÊÇʹÓÃJava±àдµÄ£¬ËùÒÔÎÒÃÇÔÚWebÓ¦ÓÃÖпÉÒÔͨ¹ýJSP¡¢ServletÀ´µ÷ÓÃAPIʵÏÖ¶ÔExcelÊý¾Ý±íµÄ·ÃÎÊ¡£
ÏÖÔ ......

java¿ª·¢ÈËÔ±¾­Ñé×ܽá

java¿ª·¢ÈËÔ±¾­Ñé×ܽá-Î人±±´óÇàÄñ
¡¡¡¡·Á¢Ïî
¡¡¡¡Ò»¡¢ÐèÇóµÄÊÕ¼¯£¬UCµÄ±àдËäÈ»²»ÊÇ¿ª·¢ÈËÔ±µÄ¹¤×÷£¬µ«×îÖÕÐèÒª¿ª·¢ÈËÔ±ÔÚ²úÆ·ÖÐʵÏÖ¡£ËùÒÔ¿ª·¢²»ºÏÀíµÄÉè¼ÆÖÁÉÙÀË·ÑÁËÄãµÄʱ¼ä£¬¿ª·¢¼¼ÊõÎÞ·¨ÊµÏÖµÄÉè¼Æ´øÀ´×î´óµÄÍ´¿à£ºÊ§°Ü¡£ËùÒÔ£¬¿ª·¢ÈËÔ±ÒªÖØÊÓÐèÇóÒÔ¼°UCµÄÆÀÉó£¬Ìá³ö×Ô¼ºÄܹ»Ïëµ½µÄËùÓÐÒìÒé¡£
¡¡¡¡¶þ¡¢Ò»¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ