javaµÄÄÚ´æºÍ¶ÑÕ»
ÔÎĵØÖ·£ºÎªÁ˱¸Íü£¬×ªÔØ×Ôhttp://www.j2megame.org/index.php/content/view/1989/125.html
1. javaÖжÑÓëÕ»
ÔÚJava³ÌÐòÔËÐÐʱ£¬ÓÐ6¸öµØ·½¿ÉÒÔÓÃÓÚ±£´æÊý¾Ý£º
(1) ¼Ä´æÆ÷¡£×î¿ìµÄ±£´æÇøÓò£¬Î»ÓÚ´¦ÀíÆ÷ÄÚ²¿,ÊýÁ¿Ê®·ÖÓÐÏÞ£¬ËüÊǸù¾ÝÐèÒªÓɱàÒëÆ÷·ÖÅä¡£ÎÒÃǶԴËûÓÐÖ±½ÓµÄ¿ØÖÆȨ.
(2)
Õ»(stack)¡£×¤ÁôÓÚ³£¹æRAM£¨Ëæ»ú·ÃÎÊ´æ´¢Æ÷£©ÇøÓò£¬ÕâÊÇÒ»ÖÖÌرð¿ì¡¢ÌرðÓÐЧµÄÊý¾Ý±£´æ·½Ê½£¬½ö´ÎÓڼĴæÆ÷¡£´´½¨³ÌÐòʱ£¬Java±àÒëÆ÷±ØÐë×¼
È·µØÖªµÀ¶ÑÕ»ÄÚ±£´æµÄËùÓÐÊý¾ÝµÄ“³¤¶È”ÒÔ¼°“´æÔÚʱ¼ä”¡£ÕâʧȥÁËÒ»¶¨µÄÁé»îÐÔ£¬Òò´Ë¶ÔÏó¾ä±úÊÇ´æ·ÅÔÚÕ»ÖУ¬µ«Java¶ÔÏó²¢²»·Åµ½ÆäÖС£
(3)
¶Ñ(heap)¡£±£´æÁËJava¶ÔÏ󡣺ÍÕ»²»Í¬£¬Ëü×îÎüÒýÈ˵ĵط½ÔÚÓÚ±àÒëÆ÷²»±ØÖªµÀÒª´Ó¶ÑÀï·ÖÅä¶àÉÙ´æ´¢¿Õ¼ä£¬Ò²²»±ØÖªµÀ´æ´¢µÄÊý¾ÝÒªÔÚ¶ÑÀïÍ£Áô¶à³¤µÄ
ʱ¼ä¡£Òò´Ë£¬Óöѱ£´æÊý¾Ýʱ»áµÃµ½¸ü´óµÄÁé»îÐÔ¡£ÒªÇó´´½¨Ò»¸ö¶ÔÏóʱ£¬Ö»ÐèÓÃnewÃüÁî±àÖÆÏà¹ØµÄ´úÂë¼´¿É¡£Ö´ÐÐÕâЩ´úÂëʱ£¬»áÔÚ¶ÑÀï×Ô¶¯½øÐÐÊý¾ÝµÄ±£
´æ¡£µ±È»£¬Îª´ïµ½ÕâÖÖÁé»îÐÔ£¬±ØÈ»»á¸¶³öÒ»¶¨µÄ´ú¼Û£ºÔÚ¶ÑÀï·ÖÅä´æ´¢¿Õ¼äʱ»á»¨µô¸ü³¤µÄʱ¼ä£¡
(4) ¾²Ì¬´æ´¢¡£Õâ¶ùµÄ“¾²Ì¬”£¨Static£©ÊÇÖ¸“λÓڹ̶¨Î»ÖÔ£¨¾¡¹ÜÒ²ÔÚRAMÀ¡£³ÌÐòÔËÐÐÆڼ䣬¾²Ì¬´æ´¢µÄÊý¾Ý½«ËæʱµÈºòµ÷Ó᣿ÉÓÃstatic¹Ø¼ü×ÖÖ¸³öÒ»¸ö¶ÔÏóµÄÌض¨ÔªËØÊǾ²Ì¬µÄ¡£µ«Java¶ÔÏó±¾ÉíÓÀÔ¶¶¼²»»áÖÃÈ뾲̬´æ´¢¿Õ¼ä¡£
(5) ³£Êý´æ´¢¡£³£Êýֵͨ³£Ö±½ÓÖÃÓÚ³ÌÐò´úÂëÄÚ²¿¡£ÕâÑù×öÊÇ°²È«µÄ£¬ÒòΪËüÃÇÓÀÔ¶¶¼²»»á¸Ä±ä¡£Óеij£ÊýÐèÒªÑϸñµØ±£»¤£¬ËùÒÔ¿É¿¼Âǽ«ËüÃÇÖÃÈëÖ»¶Á´æ´¢Æ÷£¨ROM£©¡£
(6) ·ÇRAM´æ´¢¡£Êý¾ÝÍêÈ«¶ÀÁ¢ÓÚÒ»¸ö³ÌÐòÖ®Í⣬Ôò³ÌÐò²»ÔËÐÐʱÈÔ¿É´æÔÚ£¬²¢ÔÚ³ÌÐòµÄ¿ØÖÆ·¶Î§Ö®Íâ¡£
2£®¶ÑºÍÕ»µÄÇø±ð
Õ»Óë¶Ñ¶¼ÊÇJavaÓÃÀ´ÔÚRamÖдæ·ÅÊý¾ÝµÄµØ·½¡£ÓëC++²»Í¬£¬Java×Ô¶¯¹ÜÀíÕ»ºÍ¶Ñ£¬³ÌÐòÔ±²»ÄÜÖ±½ÓµØÉèÖÃÕ»»ò¶Ñ¡£
Java
µÄ¶ÑÊÇÒ»¸öÔËÐÐʱÊý¾ÝÇø,ÀàµÄ(¶ÔÏó´ÓÖзÖÅä¿Õ¼ä¡£ÕâЩ¶ÔÏóͨ¹ýnew¡¢newarray¡¢anewarrayºÍmultianewarrayµÈÖ¸Á
Á¢£¬ËüÃDz»ÐèÒª³ÌÐò´úÂëÀ´ÏÔʽµÄÊÍ·Å¡£¶ÑÊÇÓÉÀ¬»ø»ØÊÕÀ´¸ºÔðµÄ£¬¶ÑµÄÓÅÊÆÊÇ¿ÉÒÔ¶¯Ì¬µØ·ÖÅäÄÚ´æ´óС£¬Éú´æÆÚÒ²²»±ØÊÂÏȸæËß±àÒëÆ÷£¬ÒòΪËüÊÇÔÚÔËÐÐʱ¶¯Ì¬·Ö
ÅäÄÚ´æµÄ£¬JavaµÄÀ¬»øÊÕ¼¯Æ÷»á×Ô¶¯ÊÕ×ßÕâЩ²»ÔÙʹÓõÄÊý¾Ý¡£µ«È±µãÊÇ£¬ÓÉÓÚÒªÔÚÔËÐÐʱ¶¯Ì¬·ÖÅäÄڴ棬´æÈ¡ËٶȽÏÂý¡£
Õ»µÄÓÅÊÆÊÇ£¬
´æÈ¡ËٶȱȶÑÒª¿ì£¬½ö´ÎÓڼĴæÆ÷£¬Õ»Êý¾Ý¿ÉÒÔ¹²Ïí¡£µ«È±µãÊÇ£¬´æÔÚÕ»ÖеÄÊý¾Ý´óСÓëÉú´æÆÚ±ØÐë
Ïà¹ØÎĵµ£º
jarÎļþÌý˵¹ýÂð£¬Ã»ÓУ¿»òÕßÄ°Éú£¡ºÃ£¬Ã»¹Øϵ£¬Õâ¾ÍÊÇÎÒÃǵĵÚÒ»Õ¾£º´ò°ü·¢²¼¡£
Ϊʲô»áÓÐÕâ¸öÍæÒâÄØ£¬Ê×ÏÈ£¬ÕâÊÇjarµÄÈ«³Æ£ºJavaTM Archive (JAR) file£¬Êǵģ¬¾ÍÊÇjava´æµµÎļþ¡£ÕâÓеãÀàËÆzipÎļþ£¬ÏëÒ»ÏëËüÊǸÉʲôµÄÓõÄÄØ£¬Ñ¹Ëõ£¡£¿Ã»´í¾ÍÊÇҪѹËõ£¬½«ÎÒÃÇÔÏÈÁãÉ¢µÄ¶«Î÷·Åµ½Ò»Ï£¬ÖØР×éÖ¯£¬ËùÓÐÕâЩĿµÄÖ»ÓÐÒ»¸ ......
¸÷ÖÖJavaÖÐÎÄתÂëµÄÀý×Ó£¬ÓÃÀ´¶Ô¸¶ÂÒÂë
public class HelloWorld
{
public static void main(String[] argv){
try{
System.out.println("ÖÐÎÄ1"); //1
System.out.p ......
package com.mapabc.sz_hbt.util;
/**
* <p>Title:ÕûÐÍÓ볤¶ÈΪ4µÄ×Ö½ÚÊý×éµÄ»¥»» </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2007-5-10</p>
* <p>Company: www.mapabc.com</p>
* @author luoyj
* @version 1.0
*/
public class Byte ......
ÕâÀï×ܽáÒ»ÏÂXMLÎļþµÄ¶Áд¹ý³Ì£¬ÏÈ˵һÏÂдµÄ¹ý³Ì£¬ÕâÀïÎÒÓõÄÊÇXmlDocumentµÄwrite·½·¨ÊµÏֵģ¬Ð´µÄ¹ý³ÌÊDZȽϼòµ¥µÄ£¬Ö»ÐèÒª¶¨Òå×Ô¼ºÏëÒªµÄÔªËرäÁ¿£¬
Element user=null;
Element username=null,password=null;
È»ºó
// ¶¨Ò幤³§£¬Ê¹Ó¦ÓóÌÐòÄܹ»´Ó XML Î ......