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

JAVA ÄÚ²¿ÀàµÄ¼òµ¥×ܽá

¶¨ÒåÔÚÒ»¸öÀàÄÚ²¿µÄÀà½ÐÄÚ²¿À࣬°üº¬ÄÚ²¿ÀàµÄÀà³ÆΪÍⲿÀà¡£ÄÚ²¿Àà¿ÉÒÔÉùÃ÷public¡¢protected¡¢privateµÈ·ÃÎÊÏÞÖÆ£¬¿ÉÒÔÉùÃ÷ΪabstractµÄ¹©ÆäËûÄÚ²¿Àà»òÍⲿÀà¼Ì³ÐÓëÀ©Õ¹£¬»òÕßÉùÃ÷Ϊstatic¡¢finalµÄ£¬Ò²¿ÉÒÔʵÏÖÌض¨µÄ½Ó¿Ú¡£staticµÄÄÚ²¿ÀàÐÐΪÉÏÏóÒ»¸ö¶ÀÁ¢µÄÀ࣬·ÇstaticÔÚÐÐΪÉÏÀàËÆÀàµÄÊôÐÔ»ò·½·¨ÇÒ½ûÖ¹ÉùÃ÷staticµÄ·½·¨¡£ÄÚ²¿Àà¿ÉÒÔ·ÃÎÊÍⲿÀàµÄËùÓз½·¨ÓëÊôÐÔ£¬µ«staticµÄÄÚ²¿ÀàÖ»ÄÜ·ÃÎÊÍⲿÀàµÄ¾²Ì¬ÊôÐÔÓë·½·¨¡£
ÍⲿÀà°´³£¹æµÄÀà·ÃÎÊ·½Ê½Ê¹ÓÃÄÚ²¿À࣬ΨһµÄ²î±ðÊÇÍⲿÀà¿ÉÒÔ·ÃÎÊÄÚ²¿ÀàµÄËùÓз½·¨ÓëÊôÐÔ£¬°üÀ¨Ë½Óз½·¨ÓëÊôÐÔ¡£È磺
        pinner p = new pinner();
        p.index = 20;
        p.Print();
        ---- ÕâÖÖ·½Ê½ÊʺÏÍⲿÀàµÄ·Çstatic·½·¨£»
        pouter po = new pouter();
        pinner pi = po.new pinner();
        pi.index = 40;
        pi.Print();
        ---- ÕâÖÖ·½Ê½ÊʺÏÍⲿÀàµÄstatic·½·¨£»
ÄÚ²¿ÀàÀàËÆÍⲿÀàµÄÊôÐÔ£¬Òò´Ë·ÃÎÊÄÚ²¿Àà¶ÔÏóʱ×ÜÊÇÐèÒªÒ»¸ö´´½¨ºÃµÄÍⲿÀà¶ÔÏó¡£ÄÚ²¿Àà¶ÔÏóͨ¹ý‘ÍⲿÀàÃû.this.xxx’µÄÐÎʽ·ÃÎÊÍⲿÀàµÄÊôÐÔÓë·½·¨¡£È磺
            System.out.println("Print in inner Outer.index=" + pouter.this.index);
            System.out.println("Print in inner Inner.index=" + this.index);
Èç¹ûÐèÒªÔÚÆäËûÀàÖзÃÎÊÄÚ²¿À࣬¿ÉÒÔʹÓãº
(1)ÍⲿÀàÌṩ´´½¨ÄÚ²¿ÀàµÄ·½·¨¹©ÆäËûÀàʹÓá£È磺
        // ÍⲿÀà
        pinner getInner()
        {
            return new pinner();
        }
        // ÆäËûÀà
        pouter.pinner pi = po.getInner();
     &nb


Ïà¹ØÎĵµ£º

ÈÕÆÚÀà¼Ó¼õ¼°JavaÖÐÈÕÆÚÀà²Ù×÷Ëã·¨´óÈ«

1.¼ÆËãijһÔ·ݵÄ×î´óÌìÊý
1Calendar time=Calendar.getInstance();
2time.clear();
3time.set(Calendar.YEAR,year); //year Ϊ int
4time.set(Calendar.MONTH,i-1);//×¢Òâ,Calendar¶ÔÏóĬÈÏÒ»ÔÂΪ0
5int day=time.getActualMaximum(Calendar.DAY_OF_MONTH);//±¾Ô·ݵÄÌìÊý
×¢£ºÔÚʹÓÃset·½·¨Ö®Ç°£¬±ØÐë ......

ÉÏ´«ÏÂÔØjspSmartUpload°üµÄʹÓÃ[Java]

ÉÏ´«ÏÂÔØjspSmartUpload°üµÄʹÓÃ[Java]
Ò»¡¢°²×°Æª
¡¡¡¡jspSmartUploadÊÇÓÉwww.jspsmart.comÍøÕ¾¿ª·¢µÄÒ»¸ö¿ÉÃâ·ÑʹÓõÄÈ«¹¦ÄܵÄÎļþÉÏ´«ÏÂÔØ×é¼þ£¬ÊÊÓÚǶÈëÖ´ÐÐÉÏ´«ÏÂÔزÙ×÷µÄJSPÎļþÖС£¸Ã×é¼þÓÐÒÔϼ¸¸öÌص㣺
1¡¢Ê¹Óüòµ¥¡£ÔÚJSPÎļþÖнö½öÊéдÈýÎåÐÐJAVA´úÂë¾Í¿ÉÒԸ㶨ÎļþµÄÉÏ´«»òÏÂÔØ£¬·½±ã¡£
2¡¢ÄÜÈ«³Ì¿ØÖÆÉ ......

javaС¼¼ÇÉ£¨Ò»£©

ÔںܶàÊý¾Ý¿âÖУ¬“ÐÔ±ð”ÕâÒ»×Ö¶ÎÊÇÓÃÓÚintÀàÐÍ´æ´¢µÄ£¬ÈçÓÃ0±íʾ“Å®”£¬1±íʾ“ÄД¡£Ê¹ÓÃResultSet¶ÔÏórs½ÓÊÕ²éѯÊý¾Ý£¬ÔÚ»ñÈ¡Êý¾Ýʱʱ£¬rs.getString()·½·¨ºÍrs.getInt()·½·¨»ñÈ¡µÄÈÔÈ»ÊÇ0(Çø±ðÔÚÓÚStringÀàÐÍ»òÊÇintÀàÐÍ)¡£¶øÔÚʵ¼ÊÓ¦ÓÃʱ£¬ÎÒÃǸüÏ£Íû»ñµÃµÄÊý¾ÝÊÇÖ±¹ÛµØÏÔʾ“ÄÐ ......

½âÎöJava¶ÔÏóµÄequals()ºÍhashCode()µÄʹÓÃ

ÔÚJavaÓïÑÔÖУ¬equals()ºÍhashCode()Á½¸öº¯ÊýµÄʹÓÃÊǽôÃÜÅäºÏµÄ£¬ÄãÒªÊÇ×Ô¼ºÉè¼ÆÆäÖÐÒ»¸ö£¬¾ÍÒªÉè¼ÆÁíÍâÒ»¸ö¡£ÔÚ¶àÊýÇé¿ö
Ï£¬ÕâÁ½¸öº¯ÊýÊDz»Óÿ¼Âǵģ¬Ö±½ÓʹÓÃËüÃǵÄĬÈÏÉè¼Æ¾Í¿ÉÒÔÁË¡£µ«ÊÇÔÚһЩÇé¿öÏ£¬ÕâÁ½¸öº¯Êý×îºÃÊÇ×Ô¼ºÉè¼Æ£¬²ÅÄÜÈ·±£Õû¸ö³ÌÐòµÄÕý³£ÔËÐС£×î³£¼ûµÄÊǵ±
Ò»¸ö¶ÔÏó±»¼ÓÈëÊÕ¼¯¶ÔÏó£¨collection
ob ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ