Effective Java ѧϰ±Ê¼Ç (7)
Finalizer ²»¿É¼Æ»®µÄ,Ò²ÊÇΣÏÕµÄ,Ò»°ãÒ²ÊDz»±ØÒªµÄ. ²»ÄÜÔÚfinalizerÖзÅÈκÎÓëÒÀÀµÊ±¼äÏà¹ØµÄ²Ù×÷,ÒòΪÄã²»ÖªµÀËüʲôʱºò±»Ö´ÐÐ. ±ÈÈçÔÚfinalizerÖйرÕÎļþµÄ×ö·¨¾ÍÊÇ´íÎóµÄ, ¸ù¾ÝJVMµÄʵÏÖ·½Ê½²»Í¬,ÓпÉÄܵ¼Ö´ò¿ªµÄÎļþÊý¹ý¶à¶øÎÞ·¨ÔÙ´ò¿ªÎļþ. Ò²²»ÄÜÔÚfinalizerÖиıä״̬,Èç¸øÊý¾Ý¿â½âËøµÈ. finalizer»¹ÄÜ´øÀ´ÑÏÖØµÄÐÔÄÜÎÊÌâ, ÏÔʾµÄµ÷ÓõÄÖÕÖ¹º¯Êý¿ÉÒÔ²ÉÓÃtry -finallyµÄÓï¾ä µ±È»,ºÏ·¨µÄʹÓÃfinalizerÓÐÁ½ÖÖÇé¿ö: Ò»ÖÖÊÇ×öΪ×îºóµÄÒ»µÀ¹Ø¿¨,¼ì²âÓû§ÊÇ·ñÓÐûÓб»ÊͷŵÄ×ÊÔ´,Èç¹ûÓÐÔòÊÍ·ÅËü,²¢´òÓ¡³ö¾¯¸æ. ËäÈ»²»ÌᳫÔÚfinalizerÖÐÊÍ·Å×ÊÔ´,µ«ÍíÊÍ·Å×ܱȲ»ÊͷźÃ(beter later than never) »¹Ò»ÖֺϷ¨Ê¹ÓþÍÊÇÔÚʹÓà native·½·¨µÄʱºò. ҪעÒâ,finallizerûÓгм̹ØÏµ,ÔÚ×ÓÀàÖбØÐëÏÔʾµ÷Óø¸ÀàÖеĺ¯Êý.
Ïà¹ØÎĵµ£º
Ubuntu Linux Install Sun Java Development Kit ( JDK ) and Java Runtime Environment ( JRE )
by Vivek Gite
Q.
How do I install Sun
Java Development Kit (JDK) and Java Runtime Environment (JRE) under
Ubuntu Linux? It appears that there are multiple JRE installed by
default under Ubuntu. ......
public class select {
public List XiuGai_select(String keyword){
List list=new ArrayList();
Connection conn = null;
Statement stmt = null;
String sql=null;
ResultSet res = null;
get ......
×¢Ê͵ÄÔÔò
1¡¢ ×¢ÊÍÐÎʽͳһ
ÔÚÕû¸öÓ¦ÓóÌÐòÖУ¬Ê¹ÓþßÓÐÒ»ÖµıêµãºÍ½á¹¹µÄÑùʽÀ´¹¹Ôì×¢ÊÍ¡£Èç¹ûÔÚÆäËûÏîÄ¿×é·¢ÏÖËûÃǵÄ×¢Ê͹淶ÓëÕâ·ÝÎĵµ²»Í¬£¬°´ÕÕËûÃǵĹ淶д´úÂ룬²»ÒªÊÔͼÔڼȳɵĹ淶ϵͳÖÐÒýÈëеĹ淶¡£
2¡¢ ×¢Ê͵ļò½à
ÄÚÈÝÒª¼òµ¥¡¢Ã÷ÁË¡¢º¬Òå׼ȷ£¬·ÀÖ¹×¢Ê͵ĶàÒåÐÔ£¬´íÎóµÄ×¢ÊͲ»µ«ÎÞÒæ·´¶øÓк¦¡£
......
maven ÏàÐźܶàÈ˶¼Óõ½Ìý¹ý£¬ÓõÄÈËÓ¦¸Ã²»ÊǺܶ࣬ÖÁÉÙÎÒÃǹ«Ë¾1000È˼¶±ðµÄIT²¿ÃŶ¼Ã»Óá£
¸´Ôӳ̶Ⱦö¶¨¹¤¾ßµÄʹÓÃÇé¿ö£¬¸ÕÈëÃŵijÌÐòÔ±Èç¹ûûÓÐÒ»ÖÖÁ¼ºÃµÄѧϰÐÄ̬¿´Á˿϶¨»á¶ÔantÓе㱧Թ(ʹµÃÄã²»ÄܺܿìÔÚecÉÏ¿´µ½½á¹û)¡£¿öÇÒ²»Ëµmaven×öµÄºÃ²»ºÃ£¬ÆðÂëÄܸø´óÐÍÏîÄ¿µÄ¹ÜÀíÌṩһÖÖеÄ˼·¡£×Ô¶¯»¯ÄܼõÉٺܶàʱ¼äºÍ½» ......
/* ¸ßÊÖÖ®×÷£¬±¾È˽÷ÒÔÊÕ²ØÕßÉí·Ý¹²ÏíÔ´Â룬¹©´ó¼Ò²Î¿¼Ö®! */
/*
* ÁбíADT½Ó¿Ú
*/
package dsa;
public interface List {
//²éѯÁÐ±íµ±Ç°µÄ¹æÄ£
public int getSize();
//ÅжÏÁбíÊÇ·ñΪ¿Õ
public boolean isEmpty();
//·µ»ØµÚÒ»¸öÔªËØ£¨µÄλÖã©
public Position first();
//· ......