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

java ÈÕÆÚ²î ʵÏÖ(×·ÖÖÓǰ)¹¦ÄÜ

½ñÌì¾­ÀíÈÃдһ¸ö£¬¸ù¾ÝÐÅÏ¢ÉÏ´«Ê±¼ä£¬ÏÔʾ£¬£¿·ÖÖÓǰ£¬£¿Ð¡Ê±Ç°£¬£¿Ììǰ£¬ÀàËÆqq¿Õ¼ä·¢±íµÄÐÄÇéÈÕÆÚ£»
ÓÃÁËÒ»¸ö×ÔÎҸоõ±¿µÄ·½·¨£¬²»¹ý»¹ÊÇʵÏÖÁË£¬ºÇºÇºÇ
    public static String getCompareTime(String filetime){
     //·µ»ØµÄ×Ö·û´®
    String retStr ="";
    //´«ÈëµÄÈÕÆÚÊÇ2008-9-12µÈ£¬²»×÷´¦Àí
    if(filetime.indexOf("-")>0){
     retStr =filetime;
    }
    else{
     try{
      DateFormat day = new SimpleDateFormat("dd");
      DateFormat hour = new SimpleDateFormat("HH");
      DateFormat minute = new SimpleDateFormat("mm");
         Date today = new Date();
         //µÃµ½µ±Ç°Ê±¼äµÄÈÕ£¬Ð¡Ê±£¬·ÖÖÓ
         int nowDay =Integer.parseInt(day.format(today));
         int nowHour =Integer.parseInt(hour.format(today));
         int nowMinute =Integer.parseInt(minute.format(today));
//         System.out.println("nowDay:"+nowDay);
//         System.out.println("nowDay:"+nowHour);
//         System.out.println("nowDay:"+nowMinute);
         //¸ñʽ»¯´«ÈëµÄ×Ö·û´®
      DateFormat df = new SimpleDateFormat("yy/MM/dd HH:mm:ss");
         Date dataTime = df.parse(filetime);  
         //µÃµ½´«Èëʱ¼äµÄÈÕ£¬Ð¡Ê±£¬·ÖÖÓ
         int dataDay =Integer.parseInt(day.format(dataTime));
         int dataHour =Integer.parseInt(hour.format(dataTime));
 &n


Ïà¹ØÎĵµ£º

JavaÉè¼ÆÄ£Ê½Ö®Flyweightģʽ


GOF£ºÔËÓù²Ïí¼¼ÊõÓÐЧµØÖ§³Ö´óÁ¿Ï¸Á£¶ÈµÄ¶ÔÏó¡£
 
½âÊÍһϸÅÄҲ¾ÍÊÇ˵ÔÚÒ»¸öϵͳÖÐÈç¹ûÓжà¸öÏàͬµÄ¶ÔÏó£¬ÄÇôֻ¹²ÏíÒ»·Ý¾Í¿ÉÒÔ
ÁË£¬²»±ØÃ¿¸ö¶¼È¥ÊµÀý»¯Ò»¸ö¶ÔÏó¡£±ÈÈç˵£¨ÕâÀïÒýÓÃGOFÊéÖеÄÀý×Ó£©Ò»¸öÎı¾ÏµÍ³£¬Ã¿¸ö×Öĸ¶¨Ò»¸ö¶ÔÏó£¬ÄÇô´óСд×Öĸһ¹²¾ÍÊÇ52¸ö£¬ÄÇô¾ÍÒª¶¨Òå
52¸ö¶ÔÏó¡£Èç¹ûÓÐÒ»¸ö1MµÄÎ ......

Java ×Ö·û¼¯±àÂë

Ê×ÏÈ¿´Çå³þ¼¸ÖÖ³£ÓõÄ×Ö·û¼¯±àÂë(javaÓïÑÔÊDzÉÓÃunicode×Ö·û¼¯±àÂëÀ´±íʾ×Ö·ûÓë×Ö·û´®µÄ)£º
¡¡¡¡ASCII(American Standard Code for Information Interchange£¬ÃÀ¹úÐÅÏ¢»¥»»±ê×¼´úÂë)£¬ÊÇ»ùÓÚ³£ÓõÄÓ¢ÎÄ×Ö·ûµÄÒ»Ì×µçÄÔ±àÂëϵͳ¡£ÎÒÃÇÖªµÀÓ¢ÎÄÖо­³£Ê¹ÓõÄ×Ö·û¡¢Êý×Ö·ûºÅ±»¼ÆËã»ú´¦Àíʱ¶¼ÊÇÒÔ¶þ½øÖÆÂëµÄÐÎʽ³öÏֵġ£ÕâÖÖ¶þ½ø ......

Java NIOÀà¿âSelector»úÖÆ½âÎö£¨ÉÏ£©

 
Java NIOÀà¿âSelector»úÖÆ½âÎö£¨ÉÏ£©
 
ÕÔï¿¡¡¡¡ ³Âð©
http://blog.csdn.net/haoel
 
Ò»¡¢  ǰÑÔ
 
×Ô´ÓJ2SE 1.4°æ±¾ÒÔÀ´£¬JDK·¢²¼ÁËȫеÄI/OÀà¿â£¬¼ò³ÆNIO£¬Æä²»µ«ÒýÈëÁËȫеĸßЧµÄI/O»úÖÆ£¬Í¬Ê±£¬Ò²ÒýÈëÁ˶à·¸´ÓõÄÒ첽ģʽ¡£NIOµÄ°üÖÐÖ÷Òª°üº¬ÁËÕâÑù¼¸ÖÖ³éÏóÊý¾ÝÀàÐÍ£º
  ......

JAVAÏß³ÌÖ®Î壺Ï̵߳Äͬ²½

      Èç¹û³ÌÐòÊǵ¥Ị̈߳¬Ö´ÐÐÆðÀ´²»±Øµ£ÐÄ´ËÏ̻߳ᱻÆäËûÏ̴߳òÈÅ£¬¾ÍÏñÔÚÏÖʵÖУ¬Í¬Ò»Ê±¼äÖ»Íê³ÉÒ»¼þÊÂÇ飬¿ÉÒÔ²»Óõ£ÐÄÕâ¼þÊÂÇé»á±»ÆäËûÊÂÇé´òÈÅ¡£µ«ÊÇÈç¹û³ÌÐòÖÐͬʱʹÓöàỊ̈߳¬¾ÍºÃ±ÈÏÖʵÖГÁ½¸öÈËͬʱ½øÈëÒ»ÉÈÃÅ”£¬´Ëʱ¾ÍÐèÒª¿ØÖÆ£¬·ñÔòÈÝÒ××èÈû¡£ÎªÁ˱ÜÃâ¶àÏ̹߳²Ïí×ÊÔ´·¢Éú³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ