1£®°üpackage
ÔÚµÚÒ»¾äÒýÓÃpackage pkg1[.pkg2[.pkg3]];Èç¹ûÓÐÒ»¸öÀý³ÌTest.java:ËüµÄÒýÓðü£ºpackage hi;
ÏÈÔÚµ±Ç°Ä¿Â¼ÏÂÓÃjavac -d . Test.java¾Í»áÔÚµ±Ç°Ä¿Â¼Ï½¨Á¢Ä¿Â¼hi,½«Éú³ÉµÄTest.classÎļþ·Åµ½./hi/Ï¡£
»¹ÓÐÒ»ÖÖ¾ÍÊÇÖ±½ÓÊÖ¹¤½¨Á¢hi,°ÑTest.java·Åµ½./hi/Ï£¬ÓÃjavac hi/Test.java ºÍjava hi/Test¼´¿É¡£
2£®import java.io.*;
¸ù¾Ý»·¾³±äÁ¿classpathÀ´²éÕÒ°ü£¬Èç¹ûÄã×Ô¼º´´Ð´Ò»¸öjar»òÕßÊÇzipÎļþʱ£¬Ïëµ÷ÓÃËû£¬Ò»¶¨ÒªÔÚclasspathÖÐд³öÀ´¡£
3£®Èç¹ûµÃµ½form±íµ¥´«µÝµÄÖµºÍÃû³Æ
Enumeration enum = request.getParameterNames();
while(enum.hasMoreElements()){
String paraName = (String) enum.nextElement();
String paraValue = (String) request.getParameter(paraName);
}
4£®²»ÄÜÔÚÀàµÄmainºÍº¯ÊýÍâÓÃSystem.out.println£¬ÔÚ¾²Ì¬º¯ÊýÖв»ÄÜÒýÓþ²Ì¬±äÁ¿¡£
5£®ÔÚÀàÖУ¬ÓÐʵÀý±äÁ¿ºÍÀà±äÁ¿Á½ÖÖ£¬Àà±äÁ¿¾ÍÊDZ»ÀàÖеÄËùÓжÔÏó¹²Ïí¡£ÒªÓÃstatic.
·½·¨ÓÐʵÀý·½·¨£®Àà·½·¨ºÍ¹¹ÔìÆ÷·½·¨ÈýÖÖ¡£µÚÒ»ÖÖÖ»ÓÐÏÈ´´½¨¶ÔÏóÔÙµ÷ÓÃËû¡£µÚ¶þÖÖÒªÓÃstatic£¬¿ÉÒÔÖ±½Óµ÷ÓÃËû¡£
6.thisÊÇÒ»¸ö·Ç¾²Ì¬µÄ±äÁ¿£¬²»ÄÜÓëstatic²¢´æ¡£
7£®Èç¹ûÒ»¸öJAVA³ÌÐòûÓаü£¬ÔÚÒýÓõÄʱºò£¬ÒªÓÃimport ÎļþÃû¡£
8£®ÈçºÎÈ¥ÖÆÔìȱʡֵµÄ²ÎÊýÄØ£¿
eg: function(arg1,arg2)
eg: function(arg1) return function(arg1,'no');
9£®ÔÚJSP³Ìʽ»òÕßÊÇSERVLETÖУ¬Èç¹ûÏëÍ˳ö³ÌÐòÖ´ÐУ¬Ö±½Óreturn¾Í¿ÉÒÔÁË¡£
10£®Ð½¨Ò»¸öÀàµÄÁíÒ»ÖÖ·½·¨£º
Class _s = Class.forName('java.util.Date');
Date d = _s.newInstance();
11£®instanceofÊÇÅжÏÒ»¶ÔÏóµÄÒýÓÃÊÇ·ñijһÀàÐÍ¡£
eg: Interger i = new Integer(10); if(i instanceof Integer) T if(i instanceof Long) F
helloyoyo ÓÚ 2010-03-04 13:04:22·¢±í:
ѧϰѧϰ
oforyou ÓÚ 2010-03-03 15:15:03·¢±í:
JAVA¸øÎҵĸоõÊǺÜÂýÂý
xiaoku8891 ÓÚ 2010-02-26 17:17:37·¢±í:
ѧϰÏ¡£¡£¶¥ÁË
¹â½Å³à²² ÓÚ 2010-01-21 19:04:33·¢±í:
xuexile
ÁåÁå ÓÚ 2010-01-06 13:35:11·¢±í:
ѧϰ
uchiha ÓÚ 2010-01-02 21:52:45·¢±í:
ѧϰ