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
Ïà¹ØÎĵµ£º
ÏÖÔÚ»¹ÓкܶàÈ˸㲻¶®PHPºÍJAVA¿ª·¢µÄÐͬOAµ½µ×ÓÐʲô²»Í¬£¬¶Ô×Ô¼ºµ½µ×ÓÐʲôӰÏ죬ÒÔÖÁÓÚ×ö³öÁË´íÎóµÄÑ¡Ôñ¶øêݺ¦ÎÞÇî¡£±ÊÕ߸ù¾ÝÁ½ÖÖ¼¼ÊõµÄÌصãÖØÐÂÕûÀíÁËÒ»¸ö¶Ô±È£¬¸ø¹ØÐÄÐͬOA¼¼ÊõµÄ¶ÁÕß×ö¸ö²Î¿¼¡£
»ªÌ춯Á¦ÐͬOAÊDzÉÓÃJAVA¼¼ÊõµÄµäÐÍ´ú±í£¬²¢¾ßÓÐһϵÁÐÓÅ»¯É ......
ת£º http://hi.baidu.com/jiong0818/blog/item/93f9b21641294b4d20a4e971.html JavaÖÐÈÕÆÚ¸ñʽת»» /** * ×Ö·û´®×ª»»Îªjava.util.Date
* Ö§³Ö¸ñʽΪ yyyy.MM.dd G 'at' hh:mm:ss z Èç '2002-1-1 AD at 22:10:59 PSD'
* yy/MM/dd HH:mm:ss Èç '2002/1/1 17:55:00'
* yy/MM/dd HH:mm:ss pm Èç '2002/1/1 17:55:00 p ......
JavaѧϰµÄ30¸öÄ¿±ê
1. ÄãÐèÒª¾«Í¨ÃæÏò¶ÔÏó·ÖÎöÓëÉè¼Æ(OOA/OOD)¡¢É漰ģʽ(GOF£¬J2EEDP)ÒÔ¼°×ÛºÏģʽ¡£ÄãÓ¦¸ÃÊ®·ÖÁ˽âUML£¬ÓÈÆäÊÇclass£¬object£¬interactionÒÔ¼°statediagrams¡£
2. ÄãÐèҪѧϰJAVAÓïÑԵĻù´¡ÖªÊ¶ÒÔ¼°ËüµÄºËÐÄÀà¿â(collections£¬serialization£¬streams£¬networking£¬ multithreading£¬reflection£ ......
2003 Äê 1 ÔÂ 11 ÈÕ
ʹÓÃWindows²Ù×÷ϵͳµÄÅóÓѶÔExcel£¨µç×Ó±í¸ñ£©Ò»¶¨²»»áÄ°Éú£¬µ«ÊÇҪʹÓÃJavaÓïÑÔÀ´²Ù×ÝExcelÎļþ²¢²»ÊÇÒ»¼þÈÝÒ×µÄÊ¡£ÔÚWebÓ¦ÓÃÈÕÒæÊ¢ÐеĽñÌ죬ͨ¹ýWebÀ´²Ù×÷ExcelÎļþµÄÐèÇóÔ½À´Ô½Ç¿ÁÒ£¬Ä¿Ç°½ÏΪÁ÷ÐеIJÙ×÷ÊÇÔÚJSP»òServlet Öд´½¨Ò»¸öCSV £¨comma separated values£©Îļþ£¬²¢½«Õâ¸öÎļþÒÔMIME£¬tex ......
ÔÌûµØÖ·£ºhttp://www.ibm.com/developerworks/cn/java/j-lo-jeeflex/?S_TACT=105AGX52&S_CMP=tec-csdn
´«Í³µÄ Java EE Ó¦ÓóÌÐòͨ³£Ê¹ÓÃijÖÖ MVC ¿ò¼Ü£¨ÀýÈ磬Struts£©×÷Ϊǰ¶ËÓû§½çÃ棬Ëæ×Å Flex µÄÐËÆ𣬻ùÓÚ RIA µÄ¿Í»§¶ËÄܹ»¸øÓû§´øÀ´¸ü¿áµÄ½çÃ棬¸ü¶ÌµÄÏìӦʱ¼ä£¬ÒÔ¼°¸ü½Ó½üÓÚ×ÀÃæÓ¦ÓóÌÐòµÄÌåÑé¡£±¾ÎĽ«½²Ê ......