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

JavaÃæÊÔ¾­µäÊÔÌâ¼°´ð°¸

µÚÒ»£¬Ì¸Ì¸final, finally, finalizeµÄÇø±ð¡£ ¡¡¡¡
final—ÐÞÊηû£¨¹Ø¼ü×Ö£©Èç¹ûÒ»¸öÀà±»ÉùÃ÷Ϊfinal£¬Òâζ×ÅËü²»ÄÜÔÙÅÉÉú³öеÄ×ÓÀ࣬²»ÄÜ×÷Ϊ¸¸Àà±»¼Ì³Ð¡£Òò´ËÒ»¸öÀ಻Äܼȱ»ÉùÃ÷Ϊ
abstractµÄ£¬ÓÖ±»ÉùÃ÷ΪfinalµÄ¡£½«±äÁ¿»ò·½·¨ÉùÃ÷Ϊfinal£¬¿ÉÒÔ±£Ö¤ËüÃÇÔÚʹÓÃÖв»±»¸Ä±ä¡£±»ÉùÃ÷ΪfinalµÄ±äÁ¿±ØÐëÔÚÉùÃ÷ʱ¸ø¶¨
³õÖµ£¬¶øÔÚÒÔºóµÄÒýÓÃÖÐÖ»ÄܶÁÈ¡£¬²»¿ÉÐ޸ġ£±»ÉùÃ÷ΪfinalµÄ·½·¨Ò²Í¬ÑùÖ»ÄÜʹÓ㬲»ÄÜÖØÔØ¡£
¡¡¡¡finally—ÔÙÒì³£´¦ÀíʱÌṩ finally ¿éÀ´Ö´ÐÐÈκÎÇå³ý²Ù×÷¡£Èç¹ûÅ׳öÒ»¸öÒì³££¬ÄÇôÏàÆ¥ÅäµÄ catch ×Ó¾ä¾Í»áÖ´ÐУ¬È»ºó¿ØÖÆ¾Í»á½øÈë finally ¿é£¨Èç¹ûÓеϰ£©¡£
¡¡¡¡finalize—·½·¨Ãû¡£Java ¼¼ÊõÔÊÐíʹÓà finalize()
·½·¨ÔÚÀ¬»øÊÕ¼¯Æ÷½«¶ÔÏó´ÓÄÚ´æÖÐÇå³ý³öȥ֮ǰ×ö±ØÒªµÄÇåÀí¹¤×÷¡£Õâ¸ö·½·¨ÊÇÓÉÀ¬»øÊÕ¼¯Æ÷ÔÚÈ·¶¨Õâ¸ö¶ÔÏóûÓб»ÒýÓÃʱ¶ÔÕâ¸ö¶ÔÏóµ÷Óõġ£ËüÊÇÔÚ
Object ÀàÖж¨ÒåµÄ£¬Òò´ËËùÓеÄÀà¶¼¼Ì³ÐÁËËü¡£×ÓÀา¸Ç finalize ()
·½·¨ÒÔÕûÀíϵͳ×ÊÔ´»òÕßÖ´ÐÐÆäËûÇåÀí¹¤×÷¡£finalize() ·½·¨ÊÇÔÚÀ¬»øÊÕ¼¯Æ÷ɾ³ý¶ÔÏó֮ǰ¶ÔÕâ¸ö¶ÔÏóµ÷Óõġ£
¡¡¡¡µÚ¶þ£¬Anonymous Inner Class (ÄäÃûÄÚ²¿Àà) ÊÇ·ñ¿ÉÒÔextends(¼Ì³Ð)ÆäËüÀ࣬ÊÇ·ñ¿ÉÒÔimplements(ʵÏÖ)interface(½Ó¿Ú)?
¡¡¡¡ÄäÃûµÄÄÚ²¿ÀàÊÇûÓÐÃû×ÖµÄÄÚ²¿Àà¡£²»ÄÜextends(¼Ì³Ð) ÆäËüÀ࣬µ«Ò»¸öÄÚ²¿Àà¿ÉÒÔ×÷Ϊһ¸ö½Ó¿Ú£¬ÓÉÁíÒ»¸öÄÚ²¿ÀàʵÏÖ¡£
¡¡¡¡µÚÈý£¬Static Nested Class ºÍ Inner ClassµÄ²»Í¬£¬ËµµÃÔ½¶àÔ½ºÃ(ÃæÊÔÌâÓеĺÜÁýͳ)¡£
¡¡¡¡Nested Class £¨Ò»°ãÊÇC++µÄ˵·¨£©£¬Inner Class
(Ò»°ãÊÇJAVAµÄ˵·¨)¡£JavaÄÚ²¿ÀàÓëC++ǶÌ×Àà×î´óµÄ²»Í¬¾ÍÔÚÓÚÊÇ·ñÓÐÖ¸ÏòÍⲿµÄÒýÓÃÉÏ¡£¾ßÌå¿É¼ûhttp:
//www.frontfree.net/articles/services/view.asp? id=704&page=1 ¡¡¡¡ ×¢£º
¾²Ì¬ÄÚ²¿ÀࣨInner
Class£©Òâζ×Å1´´½¨Ò»¸östaticÄÚ²¿ÀàµÄ¶ÔÏ󣬲»ÐèÒªÒ»¸öÍⲿÀà¶ÔÏó£¬2²»ÄÜ´ÓÒ»¸östaticÄÚ²¿ÀàµÄÒ»¸ö¶ÔÏó·ÃÎÊÒ»¸öÍⲿÀà¶ÔÏó
¡¡¡¡µÚËÄ£¬&ºÍ&&µÄÇø±ð¡£
¡¡¡¡&ÊÇλÔËËã·û¡£&&ÊDz¼¶ûÂß¼­ÔËËã·û¡£
¡¡¡¡µÚÎ壬HashMapºÍHashtableµÄÇø±ð¡£
¡¡¡¡¶¼ÊôÓÚMap½Ó¿ÚµÄÀ࣬ʵÏÖÁ˽«Î©Ò»¼üÓ³Éäµ½ÌØ¶¨µÄÖµÉÏ¡£ ¡¡¡¡ HashMap ÀàûÓзÖÀà»òÕßÅÅÐò¡£ËüÔÊÐíÒ»¸ö null ¼üºÍ¶à¸ö
null  Öµ¡£ ¡¡¡¡ Hashtable ÀàËÆÓÚ HashMap£¬µ«ÊDz»ÔÊÐí null ¼üºÍ null Öµ¡£ËüÒ²±È HashMap
Âý£¬ÒòΪËüÊÇͬ²½µÄ¡£
¡¡¡¡µÚÁù£¬Collection ºÍ CollectionsµÄÇø±ð¡£
¡¡¡


Ïà¹ØÎĵµ£º

JavaÄÚ²¿ÀࣨInner Class£©Ïê½â

¼òµ¥µÄ˵£¬ÄÚ²¿£¨inner£©ÀàÖ¸ÄÇЩÀඨÒå´úÂë±»ÖÃÓÚÆäËüÀඨÒåÖеÄÀࣻ¶ø¶ÔÓÚÒ»°ãµÄ¡¢ÀඨÒå´úÂ벻ǶÌ×ÔÚÆäËüÀඨÒåÖеÄÀ࣬³ÆÎª¶¥²ã£¨top-level£©Àà¡£¶ÔÓÚÒ»¸öÄÚ²¿À࣬°üº¬Æä¶¨Òå´úÂëµÄÀà³ÆÎªËüµÄÍⲿ£¨outer£©Àà¡£
1          Static member class£¨¾²Ì¬³ÉÔ±Àࣩ
ÀàÉùÃ÷ÖÐ ......

JAVA ComparatorºÍComparableÔÚÅÅÐòÖеÄÓ¦ÓÃ

ComparatorºÍComparableÔÚÅÅÐòÖеÄÓ¦ÓÃ
µ±ÐèÒªÅÅÐòµÄ¼¯ºÏ»òÊý×é²»Êǵ¥´¿µÄÊý×ÖÐÍʱ£¬Í¨³£¿ÉÒÔʹÓÃComparator»òComparable£¬ÒÔ¼òµ¥µÄ·½Ê½ÊµÏÖ¶ÔÏóÅÅÐò»ò×Ô¶¨ÒåÅÅÐò¡£
Ò»¡¢Comparator
Ç¿ÐжÔij¸ö¶ÔÏócollection½øÐÐÕûÌåÅÅÐòµÄ±È½Ïº¯Êý£¬¿ÉÒÔ½«Comparator´«µÝ¸øCollections.sort»òArrays.sort¡£
½Ó¿Ú·½·¨£º
   ......

Java¸´Ï°±Ê¼Ç µÚ9Ìì


Hibernate
    
Hibernate
ÊÇÒ»¸öÓÅÐãµÄ³Ö¾Ã»¯¿ò¼Ü
    
˲ʱ״̬£¬³Ö¾Ã״̬
    
ORM
£º¶ÔÏó¹ØÏµÓ³É䣬Íê³É¶ÔÏóÊý¾Ýµ½¹ØÏµÊý¾ÝµÄÓ³Éä»úÖÆ
    
ʹÓÃ
Hibernate
µÄÈýÏî×¼±¸¹¤×÷ÊÇ£º
1¡¢ 
Ìí¼Ó
hibernate
¿â
......

ÔõÑù²ÅÄÜÌá¸ßJAVAµÄÐÔÄÜ?

Ìá¸ßJAVAµÄÐÔÄÜ£¬Ò»°ã¿¼ÂÇÈçϵÄËĸöÖ÷Òª·½Ã棺
£¨1£© ³ÌÐòÉè¼ÆµÄ·½·¨ºÍģʽ
Ò»¸öÁ¼ºÃµÄÉè¼ÆÄÜÌá¸ß³ÌÐòµÄÐÔÄÜ£¬ÕâÒ»µã²»½öÊÊÓÃÓÚJAVA£¬Ò²ÊÊÓÃÒ²Èκεıà³ÌÓïÑÔ¡£ÒòΪËü³ä·ÖÀûÓÃÁ˸÷ÖÖ×ÊÔ´£¬ÈçÄڴ棬CPU,¸ßËÙ»º´æ£¬¶ÔÏó»º³å³Ø¼°¶àỊ̈߳¬´Ó¶øÉè¼Æ³ö¸ßÐÔÄܺͿÉÉìËõÐÔÇ¿µÄϵͳ¡£
µ±È»£¬ÎªÁËÌá¸ß³ÌÐòµÄÐÔÄܶø¸Ä±äÔ­À´µÄÉè¼ÆÊÇ ......

Inner classes in Java, the mystery within.

Inner classes, also called Nested Classes, are nothing but classes that are defined within other classes. The nesting is a relationship between classes, not objects.
Inner classes have clearly two benefits, name control & access control. In Java, this benefit is not as important because Java pa ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ