JAVA³ÌÐòÔ±ÃæÊÔ32ÎÊ
µÚÒ»£¬Ì¸Ì¸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µÄÇø±ð¡£
CollectionsÊǸöjava.utilϵÄÀ࣬Ëü°üº¬Óи÷ÖÖÓйؼ¯ºÏ²Ù×÷µÄ¾²Ì¬·½·¨¡£
CollectionÊǸöjava.utilϵĽÓ
Ïà¹ØÎĵµ£º
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......
Ò»°ãµÄÊÊÓÃÓÚS40µÄJAVAÈí¼þ¶¼¿ÉÒÔ×°ÔÚŵ»ùÑÇ3110cÉÏ,°üÀ¨ÓÎÏ·,µç×ÓÊé,Ó¦ÓÃÈí¼þ ʲôÊÇJAVAÈí¼þÄØ£¿
JavaÊÇÓÉSun΢ϵͳ¹«Ë¾Ëù·¢Õ¹³öÀ´µÄ³ÌÐòÓïÑÔ£¬Ëü±¾ÉíÊÇÒ»ÖÖ¶ÔÏóµ¼Ïò£¨Object-Oriented£©µÄ³ÌÐòÓïÑÔ¡£JAVAÄ¿Ç°ÔÚÊÖ»úÉÏÓ¦ÓÃ×î¶àµÄ¾ÍÊÇJAVAÓÎÏ·¡£
JavaÒ²ºÅ³ÆÊÇÄÜ¿çƽ̨ʹÓõÄÓïÑÔ£¬ÕâÖ÷ÒªÊÇÒòΪJava±¾Éí±»±àÒëÖ®ºó£¬²¢² ......
package barchartdemo1;
import java.awt.Font;
import java.io.FileOutputStream;
import java.io.IOException;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.Numbe ......
JAVA
ѧϰ±Ê¼Ç£¨Ò»£©£º
JAVA
Ìåϵ¼°Æä±à³ÌµÄ¹ý³Ì
°¥£¬±ÏÒµÁËÒ²Ò»¶Îʱ¼äÁË£¬Ö»ÖªµÀÌìÌì³´úÂ룬
JAVA
µÄ»ù´¡ÖªÊ¶»ù±¾ÊÇÍüµôÁË£¬¼ÓÉÏÒÔǰһֱûÓÐϵͳµØѧϰ¹ý£¬¸Ð¾õ¿ìÒª·ÏÁË¡£»¹ÊǺúþ²ÏÂÐÄÀ´Ñ§Ñ§»ù´¡°É¡£²»ÄÜÌìÌ쿼³´úÂë¹ýÈÕ×Ó°¡¡£¡£¡£¡££¨ÏÂÎÄ´ó¶àÀ´×Կα¾ÒÔ¼°Ò»Ð©¼¼ÊõÊÓƵÉϵÄÄÚÈÝ£¬»ù±¾Àí½âÁËһЩÁË£¬Ê ......
ÊìϤC++µÄÈ˶ÔÓÚÁ½¸ö×Ö·û´®±È½ÏµÄ´úÂëÒ»¶¨ºÜÁ˽⣺
(string1==string2)
µ«ÔÚjavaÖУ¬Õâ¸ö´úÂ뼴ʹÔÚÁ½¸ö×Ö·û´®ÍêÈ«ÏàͬµÄÇé¿öÏÂÒ²»á·µ»Øfalse
JavaÖбØÐëʹÓÃstring1.equals(string2)À´½øÐÐÅжÏ
²¹³ä
Èç¹û£º
string s1=new String("Hello");
string s2=new String("Hello");
Ôò(s1==s2)=false
Èç¹û ......