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

JVMÖ¸Áî½âÎöJAVA¶àάÊý×é

ȺÄÚһλÅàѵÀÏʦ·¢³öÀ´Ò»¸öÎÊÌâ:
int[][] a = new int[10][10];
ÕâÖÖ¶àάÊý×é»áÔÚÕ»ÉÏÉú³É¼¸¸ö¶ÔÏó?
Õâ¸öÎÊÌâÐÂÏÊ,ûÈËÎʹý.
·¢³öÀ´ºó ´ó¼Ò¶¼ÈÏΪÓм¸¸öÔªËØ ¾Í»áÉú³É¼¸¸ö¶ÔÏó.
ÎÒ¿ªÊ¼Ò²
ÕâôÈÏΪ.
ÓÚÊÇд¸öÁ˳ÌÐòÊÔÁËÏÂ.·¢ÏÖûÓÐÄÇô¼òµ¥
public static void main(String[] args) {
int[][] a = new int[10][10];
}
¸ù¾ÝclassÉú³ÉJVMÖ¸Áî:
public static void main(java.lang.String[]);
Code:
Stack=2, Locals=2, Args_size=1
0: bipush 10
2: bipush 10
4: multianewarray #2, 2; //class "[[I"
8: astore_1
9: return
LineNumberTable:
line 9: 0
line 25: 9
}
javapÊDz»Æ­È˵Ä.Ã÷Ã÷°×°×µÄд×ÅStack=2,Ò»¿´Õâ½á¹û,²»Ã÷²»°×,ÔÙ×ö¼¸¸öÀý×Ó¿´ÏÂ
public static void main(String[] args) {
int[][][][] a = new int[10][20][30][40];
}
¶ÔÓ¦JVMÔ´Âë:
public static void main(java.lang.String[]);
Code:
Stack=4, Locals=2, Args_size=1
0: bipush 10
2: bipush 20
4: bipush 30
6: bipush 40
8: multianewarray #2, 4; //class "[[[[I"
12: astore_1
13: return
LineNumberTable:
line 9: 0
line 25: 13
}
ÓÖÊÔÁ˼¸¸ö ·¢ÏÖ Êý×éÓм¸Î¬,¾ÍÕ¼Óü¸¸öÕ»
ÔÙÊÔһϸ³ÖµÓë¶ÁÖµ
public static void main(String[] args) {
int[][][][] a = new int[10][20][30][40];
a[9][16][17][18] = 999;
}
¶ÔÓ¦JVMÔ´Âë:
public static void main(java.lang.String[]);
Code:
Stack=4, Locals=2, Args_size=1
0: bipush 10
2: bipush 20
4: bipush 30
6: bipush 40 //ËĸöÖµÈë²Ù×÷ÊýÕ»
8: multianewarray #2, 4; //class "[[[[I"
12: astore_1
13: aload_1 //°Ñ¸Õ²ÅnewµÄÊý×éµÄÄÚ´æµØÖ·ÈëÕ»¶¥
14: bipush 9 //½«Êý×éµÄµÚһάϱê9ÈëÕ»¶¥
16: aaload //¸ù¾ÝÕ»¶¥µÄϱê¶ÁÈ¡µ±Ç°Êý×éµÄÄÚ´æµØÖ·
17: bipush 16
19: aaload
20: bipush 17
22: aaload //¸ù¾ÝÕ»¶¥µÄϱê¶ÁÈ¡µ±Ç°Êý×éµÄÄÚ´æµØÖ·
23: bipush 18 //µÚËÄάϱêÈëÕ»
25: sipush 999 //½«Òª¸³µÄÖµÈëÕ»
28: iastore //½«Öµ ÉèÖýøµ±Ç°Ö¸ÏòµÄÊý×éÄÚ´æµØÖ·
29: return
LineNumberTable:
line 9:


Ïà¹ØÎĵµ£º

Çë´ó¼ÒÖ¸½Ì£¬ÓйØJavaÖÐmain·½·¨¼°²ÎÊýÎÊÌâ

½ñÌìûʸɡ££¬ÄÃJavaÖеÄmainº¯ÊýÀ´Ịֽ̀¬¡£¡£»¹ÇëÖîλָµã°¡£¬£¬
public static void main(String args [])
{
 .....
}
ÕâÊÇ´ó¼ÒÒ»°ãµÄд·¨°É£¬ÕâÀïÎÒÏëÌ̵ֽÄÖ÷ÒªÓÐÒÔϼ¸µã£º
1.ËüµÄ²ÎÊýÎÊÌ⣬ÄǸö²ÎÊýµ¹µ×ÓкÎÓÃÄØ£¬£¬ÕâÊǺÜÁîÈËÃÔ»óµÄ£¬ÕâÀï×Ô¼ºÐ´Á˸öÀý×ÓÊÔÁËһϣ¬µ«ÊdzöÏÖÁËÒì³££º
 class A
{ ......

java·¾¶ÎÊÌâ×îÖÕ½â¾ö·½°¸

Ç°ÑÔ
      JavaµÄ·¾¶ÎÊÌ⣬·Ç³£ÄѸ㡣×î½üµÄ¹¤×÷Éæ¼°µ½´´½¨ºÍ¶ÁÈ¡ÎļþµÄ¹¤×÷£¬ÕâÀïÎҾ͸ø´ó¼Ò³¹µ×µÃ½â¾öJava·¾¶ÎÊÌâ¡£
      ÎÒ±àдÁËÒ»¸ö·½·¨£¬±È ClassLoader.getResource(String Ïà¶Ô·¾¶)·½·¨µÄÄÜÁ¦¸üÇ¿¡£Ëü¿ÉÒÔ½ÓÊÜ“../”ÕâÑùµÄ²ÎÊý£¬ÔÊÐíÎÒÃÇÓÃÏà ......

JavaÐéÄâ»ú£¨JVM£©ÖеÄÄÚ´æÉèÖÃÏê½â

ÔÚһЩ¹æÄ£ÉÔ´óµÄÓ¦ÓÃÖУ¬JavaÐéÄâ»ú£¨JVM£©µÄÄÚ´æÉèÖÃÓÈΪÖØÒª£¬ÏëÔÚÏîÄ¿ÖÐÈ¡µÃºÃµÄЧÂÊ£¬GC£¨À¬»ø»ØÊÕ£©µÄÉèÖÃÊǵÚÒ»²½¡£
PermGen space£ºÈ«³ÆÊÇPermanent Generation space.¾ÍÊÇ˵ÊÇÓÀ¾Ã±£´æµÄÇøÓò,ÓÃÓÚ´æ·ÅClassºÍMetaÐÅÏ¢,ClassÔÚ±»LoadµÄʱºò±»·ÅÈë¸ÃÇøÓòHeap space£º´æ·ÅInstance¡£
GC(Garbage Collection)Ó¦¸Ã²»» ......

java WebService Case

Ò»¡¢Axis°²×° 1¡¢»·¾³ J2SE SDK 1.3 or 1.4: ÎÒʹÓà 1.4.2 Servlet Container: ÎÒʹÓõÄTomcat 5.0
2¡¢µ½ http://ws.apache.org/Axis/ÍøÕ¾ÏÂÔØAxis°²×°°ü
3¡¢½âѹËõ°²×°°ü£¬½«Axis_UNZIP_PATH\Axis-version\webappsϵÄAxis°ü¿½±´µ½TOMCAT_HOME\webapps\Ï£¬ÒÔÏÂÔ¼¶¨Axis_HOMEΪ¸ÃTOMCAT_HOME\webapps\AxisĿ¼
4¡¢Æô¶¯ ......

ÎÒÓÃÕâ¸ö¿´Ð§¹û£ºÒ»¸ö»ù±¾µÎJava´°¿Ú´ø°´¼ü¼ì²â

Ò»¸öJava´°¿Ú´ø°´¼ü¼ì²â£¨ÅÜJava¿ÉÊÓС³ÌÐòʱÓã©£¬沒¼ÓÐÞÊΣ¬°³×Ô¼ºÓõΡ£
package math;
import java.awt.Color;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
/**
* »ù±¾µÄ»æͼ´°¿Ú£¬»Ø³µ¹Ø±Õ´°¿Ú
*/
@SuppressWarnings("s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ