javaÖÐthisºÍsuperµÄÓ÷¨
thisµÄÓ÷¨ÔÚjavaÖдóÌå¿ÉÒÔ·ÖΪ3ÖÖ£º
//1.ÆÕͨµÄÖ±½ÓÒýÓÃ
class test {
private int x,y;
public test(int x,int y) {
setX(x);//Ò²¿ÉÒÔдΪthis.setX(x);ÕâÖÖÇé¿öÏÂthis¿ÉÒÔÊ¡ÂÔ.
}
}
//2.·½·¨ÖеÄij¸öÐβÎÃûÓ뵱ǰ¶ÔÏóµÄij¸ö³ÉÔ±ÓÐÏàͬµÄÃû×Ö.ΪÁ˲»»ìÏý,ʹÓÃthisÇø·ÖÓÐthisÒýÓõÄÊdzÉÔ±,ûÓÐthisÊÇÐβÎ
class test {
private int x,y;
public test(int x,int y) {
setX(x);//Ò²¿ÉÒÔдΪthis.setX(x);ÕâÖÖÇé¿öÏÂthis¿ÉÒÔÊ¡ÂÔ.
}
setX(int x){
this.x = x;//this.xÊÇÒýÓõĶÔÏó,xÊÇsetX(int x)ÖеÄÐвÎx
}
}
//3.ÒýÓù¹Ô캯Êý
class test.{
public int x,y;
public test(int x,int y){
this.x = x;
this.y = y;
}
public test(){
this.(2,0)//¹¹Ô캯Êýµ÷ÓÃÆäËû¹¹Ô캯ÊýµÄ·½·¨,Õâ¸öÀý×Óµ÷ÓÃÉÏÃæÄǸö¸´Óù¹Ô캯ÊýµÄ·½·¨
}
}
package test;
public class ThisTest {
private int i=0;
//µÚÒ»¸ö¹¹ÔìÆ÷£ºÓÐÒ»¸öintÐÍÐβÎ
ThisTest(int i){
this.i=i+1;//´Ëʱthis±íʾÒýÓóÉÔ±±äÁ¿£é£¬¶ø·Çº¯Êý²ÎÊý£é
System.out.println("Int constructor i——this.i: "+i+"——"+this.i);
System.out.println("i-1:"+(i-1)+"this.i+1:"+(this.i+1));
//´ÓÁ½¸öÊä³ö½á¹û³ä·ÖÖ¤Ã÷ÁËiºÍthis.iÊDz»Ò»ÑùµÄ£¡
}
// µÚ¶þ¸ö¹¹ÔìÆ÷£ºÓÐÒ»¸öStringÐÍÐβÎ
ThisTest(String s){
System.out.println("String constructor: "+s);
}
Ïà¹ØÎĵµ£º
public class Regex {
/**
* ¼ì²éemailÊäÈëÊÇ·ñÕýÈ·
* ÕýÈ·µÄÊéд¸ñʽΪ username@domain
* @param value
* @return
*/
public boolean checkEmail(String value, int length) {
return value.matches("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)* ......
jar Ó¦Óà ÏÈ´ò¿ªÃüÁîÌáʾ·û(win2000»òÔÚÔËÐпðÀïÖ´ÐÐcmdÃüÁwin98ΪDOSÌáʾ·û)£¬ÊäÈëjar
-help,È»ºó»Ø³µ(Èç¹ûÄãÅÌÉÏÒѾÓÐÁËjdk1.1»òÒÔÉÏ°æ±¾)£¬¿´µ½Ê²Ã´£º
Ó÷¨£ºjar {ctxu}[vfm0Mi] [jar-Îļþ]
[manifest-Îļþ] [-C Ŀ¼] ÎļþÃû ...
Ñ¡Ï
-c ´´½¨ÐµĴ浵
-t Áгö´æµµÄÚÈݵÄÁбí
-x
Õ¹¿ª´æµµÖеÄÃüÃûµ ......
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
2009Äê09ÔÂ01ÈÕ 09:56 ·ÖÀࣺJava×ÊѶ ä¯ÀÀ£º 33,388 ´Î
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥ ......
Ŀ ¼
1 ¼¯ºÏ¿ò¼Ü... 2
1.1 ¼¯ºÏ¿ò¼Ü¸ÅÊö... 2
1.1.1 ÈÝÆ÷¼ò½é... 2
1.1.2 ÈÝÆ÷µÄ·ÖÀà... 4
1.2 Collection. 5
1.2.1  ......
Ç°ÑÔ£ºÇ°¶Îʱ¼äÔÚCSDNµÄC++ÉçÇøÓöµ½Ò»¸öÐèÒª·â×°¿¼ÇÚ»ú½Ó¿ÚµÄ¶¯Ì¬¿â¸øJAVAµ÷ÓõÄÌû×Ó£¬¹´ÆðÁËÎÒ¶ÔJAVAµÄÎÞÏÞ»³Äî¡£ÔÚ´Ë£¬ÎÒÏë°ÑÕâÏî¼¼Êõ¼òµ¥ÔÙ½éÉÜһϡ£
Ò»¡¢¹ØÓÚJava Native Interface (JNI)
JNIÊÇJAVA±¾µØ±à³Ì½Ó¿Ú£¬ÊôÓÚJDKµÄÒ»²¿·Ö¡£ËüÔÊÐíJAVAÄܹ»²Ù×÷±¾µØAPI»òÓÉÆäËûÓïÑÔ±àдµÄ¶¯Ì¬¿â¡£²»¹ýµ±ÄãʹÓÃÕâÏî¼¼ÊõµÄʱºò£ ......