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

java»ù´¡ÖªÊ¶ÈýÊ®¶þ¼Æ


      µÚÒ»£¬Ì¸Ì¸final£¬ finally£¬ finalizeµÄÇø±ð¡£
¡¡¡¡final ÓÃÓÚÉùÃ÷ÊôÐÔ£¬·½·¨ºÍÀ࣬·Ö±ð±íʾÊôÐÔ²»¿É±ä£¬·½·¨²»¿É¸²¸Ç£¬À಻¿É¼Ì³Ð¡£finallyÊÇÒì³£´¦ÀíÓï¾ä½á¹¹µÄÒ»²¿·Ö£¬±íʾ×ÜÊÇÖ´ÐС£finalizeÊÇObjectÀàµÄÒ»¸ö·½·¨£¬ÔÚÀ¬»øÊÕ¼¯Æ÷Ö´ÐеÄʱºò»áµ÷Óñ»»ØÊÕ¶ÔÏóµÄ´Ë·½·¨£¬¿ÉÒÔ¸²¸Ç´Ë·½·¨ÌṩÀ¬»øÊÕ¼¯Ê±µÄÆäËû×ÊÔ´»ØÊÕ£¬ÀýÈç¹Ø±ÕÎļþµÈ¡£
¡¡¡¡µÚ¶þ£¬Anonymous Inner Class £¨ÄäÃûÄÚ²¿Àࣩ ÊÇ·ñ¿ÉÒÔextends£¨¼Ì³Ð£©ÆäËüÀ࣬ÊÇ·ñ¿ÉÒÔimplements£¨ÊµÏÖ£©interface£¨½Ó¿Ú£©£¿
¡¡¡¡¿ÉÒԼ̳ÐÆäËûÀà»òÍê³ÉÆäËû½Ó¿Ú£¬ÔÚswing±à³ÌÖг£Óô˷½Ê½¡£
¡¡¡¡µÚÈý£¬Static Nested Class ºÍ Inner ClassµÄ²»Í¬£¬ËµµÃÔ½¶àÔ½ºÃ£¨ÃæÊÔÌâÓеĺÜÁýͳ£©¡£
¡¡¡¡Static Nested ClassÊDZ»ÉùÃ÷Ϊ¾²Ì¬£¨static£©µÄÄÚ²¿À࣬Ëü¿ÉÒÔ²»ÒÀÀµÓÚÍⲿÀàʵÀý±»ÊµÀý»¯¡£¶øͨ³£µÄÄÚ²¿ÀàÐèÒªÔÚÍⲿÀàʵÀý»¯ºó²ÅÄÜʵÀý»¯¡£
¡¡¡¡µÚËÄ£¬&ºÍ&&µÄÇø±ð¡£
¡¡¡¡&ÊÇλÔËËã·û£¬±íʾ°´Î»ÓëÔËË㣬&&ÊÇÂß¼­ÔËËã·û£¬±íʾÂß¼­Ó루and£©¡£
¡¡¡¡µÚÎ壬HashMapºÍHashtableµÄÇø±ð¡£
¡¡¡¡HashMapÊÇHashtableµÄÇáÁ¿¼¶ÊµÏÖ£¨·ÇḬ̈߳²È«µÄʵÏÖ£©£¬ËûÃǶ¼Íê³ÉÁËMap½Ó¿Ú£¬Ö÷ÒªÇø±ðÔÚÓÚHashMapÔÊÐí¿Õ£¨null£©¼üÖµ£¨key£©£¬ÓÉÓÚ·ÇḬ̈߳²È«£¬Ð§ÂÊÉÏ¿ÉÄܸßÓÚHashtable.
¡¡¡¡µÚÁù£¬Collection ºÍ CollectionsµÄÇø±ð¡£
¡¡¡¡CollectionÊÇ****ÀàµÄÉϼ¶½Ó¿Ú£¬¼Ì³ÐÓëËûµÄ½Ó¿ÚÖ÷ÒªÓÐSet ºÍList.CollectionsÊÇÕë¶Ô****ÀàµÄÒ»¸ö°ïÖúÀ࣬ËûÌṩһϵÁо²Ì¬·½·¨ÊµÏÖ¶Ô¸÷ÖÖ****µÄËÑË÷¡¢ÅÅÐò¡¢Ḭ̈߳²È«»¯µÈ²Ù×÷¡£
¡¡¡¡µÚÆߣ¬Ê²Ã´Ê±ºòÓÃassert.
¡¡¡¡1.4ÐÂÔö¹Ø¼ü×Ö£¨Óï·¨£©£¬ÓÃÓÚ²âÊÔboolean±í´ïʽ״̬£¬¿ÉÓÃÓÚµ÷ÊÔ³ÌÐò¡£Ê¹Ó÷½·¨ assert £¬±íʾÈç¹û±í´ïʽΪÕ棨true£©£¬ÔòÏÂÃæµÄÓï¾äÖ´ÐУ¬·ñÔòÅ׳öAssertionError.ÁíÍâµÄʹÓ÷½Ê½assert < boolean±í´ïʽ>£º£¬±íʾÈç¹û±í´ïʽΪÕ棬ºóÃæµÄ±í´ïʽºöÂÔ£¬·ñÔòºóÃæ±í´ïʽµÄÖµÓÃÓÚAssertionErrorµÄ¹¹½¨²ÎÊý¡£×¢Òâ±àÒëʱҪÔö¼Ó-source 1.4 ²ÎÊý£¬·ñÔò±¨´í¡£]ÔËÐÐʱҪÔö¼Ó –ea²ÎÊý£¬·ñÔòassertÐб»ºöÂÔ
¡¡¡¡µÚ°Ë£¬GCÊÇʲô£¿ ΪʲôҪÓÐGC£¿
¡¡¡¡GCÊÇÀ¬»øÊÕ¼¯µÄÒâ˼£¨Gabage Collection£©£¬ÄÚ´æ´¦ÀíÊDZà³ÌÈËÔ±ÈÝÒ׳öÏÖÎÊÌâµÄµØ·½£¬Íü¼Ç»òÕß´íÎóµÄÄÚ´æ»ØÊջᵼÖ³ÌÐò»òϵͳµÄ²»Îȶ¨ÉõÖÁ±ÀÀ££¬JavaÌṩµÄGC¹¦ÄÜ¿ÉÒÔ×Ô¶¯¼à²â¶ÔÏóÊÇ·ñ³¬¹ý×÷ÓÃÓò´Ó¶ø´ïµ½×Ô¶¯»ØÊÕÄÚ´æµÄÄ¿µÄ£¬JavaÓïÑÔûÓÐÌṩÊÍ·Å


Ïà¹ØÎĵµ£º

javaºÍphpÎļþ¶Áд¶Ô±È¾ÙÀý¼°½â¾öÈÃÈËÍ·Í´µÄÂÒÂëÎÊÌâ

JAVAÎļþ¶Áд±ØÐëҪעÒâ±àÂëÎÊÌâ 
 javaµÄÎļþд
Ö±½ÓʹÓÃFileWriter¼´¿É£¬µÚ¶þ¸ö²ÎÊýΪ׷¼ÓдÈ룬ĬÈÏÊǸ²¸Çд¡£Ð´Íê±ØÐëclose²Å»á±£´æдºÃµÄÄÚÈÝ¡£
ĬÈÏÇé¿öÈç¹ûûÓлáн¨Ò»¸öÎļþ
FileWriter fw = null;
try {
fw = new FileWriter("/data/updatetime.dat", true); // true×·¼ÓдÈë
fw.append ......

java ³õʼ»¯µÄ˳ÐòºÍ²½Öè

´ó¼ÒÔÚÈ¥²Î¼ÓÃæÊÔµÄʱºò£¬¾­³£»áÓöµ½ÕâÑùµÄ¿¼Ì⣺¸øÄãÁ½¸öÀàµÄ´úÂ룬ËüÃÇÖ®¼äÊǼ̳еĹØϵ£¬Ã¿¸öÀàÀïÖ»Óй¹ÔìÆ÷·½·¨ºÍһЩ±äÁ¿£¬¹¹ÔìÆ÷Àï¿ÉÄÜ»¹ÓÐÒ»¶Î´úÂë¶Ô±äÁ¿Öµ½øÐÐÁËijÖÖÔËË㣬ÁíÍ⻹ÓÐһЩ½«±äÁ¿ÖµÊä³öµ½¿ØÖÆ̨µÄ´úÂ룬ȻºóÈÃÎÒÃÇÅжÏÊä³öµÄ½á¹û¡£Õâʵ¼ÊÉÏÊÇÔÚ¿¼²éÎÒÃǶÔÓڼ̳ÐÇé¿öÏÂÀàµÄ³õʼ»¯Ë³ÐòµÄÁ˽⡣
ÎÒÃÇ´ó¼ ......

Java Mail send email

package com.eastpro.batch.biz;
//import javax.activation.*;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import javax.mail.internet.*;
import javax.mail.*;
import java.io.UnsupportedEncodingException;
import java.util.*;
/**
 * Insert the type's descript ......

±ÜÃâÔÚJavaÖÐʹÓÃChecked Exception

JavaµÄException·ÖΪÁ½À࣬һÀàÊÇRuntimeException¼°Æä×ÓÀ࣬ÁíÍâÒ»Àà¾ÍÊÇchecked
Exception¡£JavaÒªÇóº¯Êý¶ÔûÓб»catch´¦ÀíµôµÄchecked
Exception£¬ÐèÒª½«ÆäдÔÚº¯ÊýµÄÉùÃ÷²¿·Ö¡£È»¶ø£¬ÕâÒ»ÒªÇó³£³£¸ø³ÌÐòÔ±´øÀ´Ò»Ð©²»±ØÒªµÄ¸ºµ£¡£
ΪÁ˱ÜÃâÔÚº¯ÊýÉùÃ÷ÖÐдthrows²¿·Ö£¬ÔÚJavaÏîÄ¿ÀïÃæ³£³£¿ÉÒÔ¿´µ½ÒÔÏ´úÂëÓÃÀ´‘Í ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ