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

javaÖеÄclon()ºÍcloneable½Ó¿ÚdzÎö

 The clone( ) method generates a duplicate copy of the object on which it is called. Only classes that implement the Cloneable interface can be cloned.
 
...clone()²úÉúÁËÒ»¸öµ÷ÓÃËüµÄ¶ÔÏóµÄ¸´ÖÆ;Ö»ÓÐʵÏÖÁËCloneable½Ó¿ÚµÄÀà²Å¿ÉÒÔ±»¸´ÖÆ¡£
 
 
The Cloneable interface defines no members. It is used to indicate that a class allows a bitwise copy of an object (that is, a clone ) to be made. If you try to call clone( ) on a class that does not implement Cloneable , a CloneNotSupportedException is thrown. When a clone is made, the constructor for the object being cloned is not called. A clone is simply an exact copy of the original.
 
Cloneable ½Ó¿ÚûÓж¨ÒåÈκγÉÔ±¡£ËüÓÃÀ´Ö¸Ã÷Ò»¸öÀà¿ÉÒÔÖðλ¸´ÖÆÒ»¸ö¶ÔÏó¡£Èç¹ûÄãÊÔͼ¶ÔÒ»¸öûÓÐʵÏÖcloneable½Ó¿ÚµÄÀàµ÷ÓÃclone()·½·¨£¬Ò»¸öCloneNotSupportedException ¾Í»áÅ׳ö¡£ÔÚ¸´ÖÆʱ£¬±»¸´ÖƵĶÔÏóµÄ¹¹ÔìÆ÷²¢Ã»Óб»µ÷Ó᣸´ÖƶÔÏó¾ÍÊÇÔ­À´¶ÔÏóµÄ¿½±´¡£
 
Cloning is a potentially dangerous action, because it can cause unintended side effects. For example, if the object being cloned contains a reference variable called obRef, then when the clone is made, obRef in the clone will refer to the same object as does obRef in the original. If the clone makes a change to the contents of the object referred to by obRef, then it will be changed for the original object, too. Here is another example. If an object opens an I/O stream and is then cloned, two objects will be capable of operating on the same stream. Further, if one of these objects closes the stream, the other object might still attempt to write to it, causing an error.
 
¸´ÖÆÊÇÒ»ÖÖ´æÔÚDZÔÚΣÏÕµÄÐÐΪ£¬ÒòΪËü»áÒýÆðһЩÒâÏë²»µ½µÄ¸º×÷Óá£ÀýÈ磬Èç¹û±»¸´ÖƵĶÔÏó°üº¬Ò»¸öÃûΪ obRef ÒýÓñäÁ¿£¬ÔÚ¸´ÖÆʱ£¬¸´ÖƶÔÏóµÄ obReºÍf Ô­À´¶ÔÏóµÄ obRef ¶¼»áÖ¸Ïòͬһ¸ö¶ÔÏó¡£Èç¹û¸´ÖƶÔÏó¶Ô obRef Ö¸ÏòµÄ¶ÔÏóµÄÄÚÈÝ×ö³öһЩ¸Ä±ä£¬¶ÔÓÚÔ­À´¶ÔÏóÀ´Ëµ£¬Ò²¾ÍÏ൱ÓÚËüÒ²±»¸Ä±äÁË¡£»¹ÓÐÁíÒ»¸öÀý×Ó£¬Èç¹ûÒ»¸ö²Ù×÷I/OÁ÷µÄ¶ÔÏ󱻸´ÖÆÁË£¬ÕâÁ½¸ö¶ÔÏó¶¼ÄܶÔͬһI/OÁ÷½øÐвÙ×÷¡£½øÒ»²½Ëµ£¬Èç¹ûËüÃÇÁ½¸öÖеÄÒ»¸ö¹Ø±ÕÁ


Ïà¹ØÎĵµ£º

JAVAÖÐÊý¾Ý¿âÁ¬½Ó³ØµÄ¶¯Ì¬ÊµÏÖ

     (Ò»)³ÌÐò¿ª·¢£¬´æÔںܶàÎÊÌâ:Ê×ÏÈ£¬Ã¿Ò»´ÎWebÇëÇó¶¼Òª½¨Á¢Ò»´ÎÊý¾Ý¿âÁ¬½Ó¡£½¨Á¢Á¬½ÓÊÇÒ»¸ö·ÑʱµÄ»î¶¯£¬Ã¿´Î¶¼µÃ»¨·Ñ0.05s¡«1sµÄʱ¼ä£¬¶øÇÒϵͳ»¹Òª·ÖÅäÄÚ´æ×ÊÔ´¡£Õâ¸öʱ¼ä¶ÔÓÚÒ»´Î»ò¼¸´ÎÊý¾Ý¿â²Ù×÷£¬»òÐí¸Ð¾õ²»³öϵͳÓжà´óµÄ¿ªÏú¡£¿ÉÊǶÔÓÚÏÖÔÚµÄWebÓ¦Óã¬ÓÈÆäÊÇ´óÐ͵ç×ÓÉÌÎñÍøÕ¾£¬Í¬Ê±Óм¸ ......

java ³ÌÐò ´ò°ü ÔËÐÐ


java´ò°ü-exeÎļþ-×îÖÕÒÔsetupÐÎʽ·¢²¼µÄ½â¾öÖ®µÀ
java´ò°ü-exeÎļþ-×îÖÕÒÔsetupÐÎʽ·¢²¼µÄ½â¾öÖ®µÀ   
Ê×ÏÈ£¬½«±àÒëºÃµÄ³ÌÐò´ò°ü³ÉjarÎļþ£¬È»ºó×ö³öexe£¬ÕâÑù´úÂë¾Í²»¿É¼ûÁË£»µ«ÊÇexeÎļþÔÚûÓа²×°jreµÄµçÄÔÉϲ»ÄÜÔËÐУ¬Èç¹ûÒªÇó¿Í»§ÔÙÈ¥°²×°jre ÉèÖû·¾³±äÁ¿ ¾Í²»ÑÅÁË¡£ÎÒÃÇÐèÒª½«jre´ò°ü¡£
Õ⼸²½²Ù×÷Í ......

javaÖеÄClassLoader

ClassLoaderÒ»¸ö¾­³£³öÏÖÓÖÈúܶàÈËÍû¶øÈ´²½µÄ´Ê£¬±¾ÎĽ«ÊÔͼÒÔ×îdzÏÔÒ׶®µÄ·½Ê½À´½²½â ClassLoader£¬Ï£ÍûÄܶԲ»Á˽â¸Ã»úÖƵÄÅóÓÑÆðµ½Ò»µãµã×÷Óá£
ÒªÉîÈëÁ˽âClassLoader£¬Ê×ÏȾÍÒªÖªµÀClassLoaderÊÇÓÃÀ´¸ÉʲôµÄ£¬¹ËÃû˼Ò壬Ëü¾ÍÊÇÓÃÀ´¼ÓÔØClassÎļþµ½JVM£¬ÒÔ¹©³ÌÐòʹÓõġ£ÎÒÃÇÖªµÀ£¬java³ÌÐò¿ÉÒÔ¶¯Ì¬¼ÓÔØÀඨÒ壬¶øÕâ ......

ʹÓÃJNI¼¼ÊõʵÏÖJAVA³ÌÐòµ÷ÓÃdll

JAVAµÄ¿çƽ̨µÄÌØÐÔÉîÊÜjava³ÌÐòÔ±ÃǵÄϲ°®,µ«ÕýÊÇÓÉÓÚËüΪÁËʵÏÖ¿çƽ̨µÄÄ¿µÄ,ʹµÃËüºÍ±¾µØ»úÆ÷µÄ¸÷ÖÖÄÚ²¿ÁªÏµ±äµÃºÜÉÙ,´ó´óÔ¼ÊøÁËËüµÄ¹¦ÄÜ,±ÈÈçÓëһЩӲ¼þÉ豸ͨÐÅ,ÍùÍùÒª»¨·ÑºÜ´óµÄ¾«Á¦È¥Éè¼ÆÁ÷³Ì±àд´úÂëÈ¥¹ÜÀíÉ豸¶Ë¿Ú,¶øÇÒÓÐһЩÉ豸³§ÉÌÌṩµÄÓ²¼þ½Ó¿ÚÒѾ­¾­¹ýÒ»¶¨µÄ·â×°ºÍ´¦Àí,²»ÄÜÖ±½ÓʹÓÃjava³ÌÐòͨ¹ý¶Ë¿ÚºÍÉè±¸Í ......

java±¨±íJXLºÍPOI´òÓ¡ÉèÖÃ


JXLµÄ´òÓ¡ÉèÖÃÔÚjxl.SheetSettingsÕâ¸öÀàÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ý·½·¨Sheet£¨»òÕßWritableSheet£©#getSettings()»ñÈ¡¡£
1.Ò³Ãæ
1.1·½Ïò
SheetSetting#setOrientation(PageOrientation po)£»
²ÎÊý£º  PageOrientation#LANDSCAPE       ºáÏò´òÓ¡
PageOrientation# PO ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ