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

javaÈÕÆÚÓÐЧÐÔÑéÖ¤

 private static boolean isValidDate(String strValue ) {//20091001×Ö·û´® 
     
   int d = Integer.parseInt(strValue.substring(6, 8));
   int m = Integer.parseInt(strValue.substring(4, 6));
   int y = Integer.parseInt(strValue.substring(0, 4));
  
   if (d < 1 || m < 1 || m > 12) return false;
  
   if (m == 2) {
          if (isLeapYear(y)) return d <= 29;
          else return d <= 28;
       }
       else if (m == 4 || m == 6 || m == 9 || m == 11)
          return d <= 30;
       else 
          return d <= 31;
    }
     
    private static boolean isLeapYear(int y) {//ÅжÏÊÇ·ñΪÈòÄê
       return y % 4 == 0 && (y % 400 == 0 || y % 100 != 0); 
    }


Ïà¹ØÎĵµ£º

java¼¯ºÏС½á

ÔÚʹÓÃJavaµÄʱºò£¬ÎÒÃǶ¼»áÓöµ½Ê¹Óü¯ºÏ£¨Collection£©µÄʱºò£¬µ«ÊÇJava APIÌṩÁ˶àÖÖ¼¯ºÏµÄʵÏÖ£¬ÎÒÔÚʹÓúÍÃæÊÔµÄʱºòƵ
ƵÓöµ½ÕâÑùµÄ“¾ñÔñ” ¡£ :£©£¨Ö÷Òª»¹ÊÇÃæÊÔµÄʱºò£©
¾Ã¶ø¾ÃÖ®£¬Ò²¾ÍÓÐÁËÒ»µãµãµÄÐĵÃÌå»á£¬Ð´³öÀ´ÒÔ¹©´ó¼ÒÌÖÂÛ ¡£
×ܵÄ˵À´£¬Java APIÖÐËùÓõļ¯ºÏÀ࣬¶¼ÊÇʵÏÖÁËCollection½Ó¿Ú£¬Ëû ......

JAVA±Ê¼Ç£¨Èý£©

ÃæÏò¶ÔÏóµÄ˼Ïë
anything is Object£¨ÍòÎï½Ô¶ÔÏó£©
³éÏ󣬴ӶԾßÌåµÄ¶ÔÏóÖгéÈ¡ÓÐÓÃÐÅÏ¢¡£
¶ÔÏóÓÐÆä¹ÌÓÐÊôÐÔ£¬¶ÔÏóµÄ·½·¨£¬¼´¶ÔÏóµÄÐÐΪ£¨¶ÔÏóÄÜ×öʲô£©
¶ÔÏó±¾ÉíÊǼòµ¥µÄ£¨¹¦Äܼòµ¥£©£¬¶à¸ö¶ÔÏó¿ÉÒÔ×é³É¸´ÔÓµÄϵͳ£¨¶ÔÏóÖ®¼ä±Ë´Ëµ÷ÓöԷ½µÄ·½·¨£©
¶ÔÏóÓ¦µ±ÊǸ÷˾ÆäÖ°£¨¹¦Äܼòµ¥£©£¬¸÷¾¡ËùÄÜ£¨°Ñ×Ô¼ºµÄ¹¦ÄÜ×÷µ½×îºÃ£© ......

JAVA±Ê¼Ç£¨Î壩

javaÖеÄÐÞÊηû
static ±íʾ¾²Ì¬£¬Ëü¿ÉÒÔÐÞÊÎÊôÐÔ£¬·½·¨ºÍ´úÂë¿é¡£
1£¬staticÐÞÊÎÊôÐÔ£¨Àà±äÁ¿£©£¬ÄÇôÕâ¸öÊôÐԾͿÉÒÔÓà ÀàÃû.ÊôÐÔÃû À´·ÃÎÊ£¬Ò²¾ÍÊÇʹÕâ¸öÊôÐÔ³ÉΪ±¾ÀàµÄÀà±äÁ¿£¬Îª±¾Àà¶ÔÏóËù¹²ÓС£Õâ¸öÊôÐÔ¾ÍÊÇÈ«À๫ÓС££¨¹²ÓеÄÀà±äÁ¿Óë¶ÔÏóÎ޹أ¬Ö»ºÍÀàÓйأ©¡£
Àà¼ÓÔصĹý³Ì£¬Àà±¾ÉíÒ²ÊDZ£´æÔÚÎļþÖУ¨×Ö½ÚÂëÎļþ± ......

javaÉè¼Æģʽ ²ßÂÔģʽ

¶¨Òå:¶¨ÒåÁËËã·¨×壬·Ö±ð·â×°ÆðÀ´£¬ÈÃËüÃÇÖ®¼ä¿ÉÒÔ»¥ÏàÌæ»»£¬´ËģʽÈÃËã·¨µÄ±ä»¯¶ÀÁ¢ÓÚʹÓÃËã·¨µÄ¿Í»§¡£
ÊÊÓÃÐÔ
Ðí¶àÏà¹ØµÄÀà½ö½öÊÇÐÐΪÓÐÒì¡£“²ßÂÔ”ÌṩÁËÒ»ÖÖÓöà¸öÐÐΪÖеÄÒ»¸öÐÐΪÀ´ÅäÖÃÒ»¸öÀàµÄËã·¨¡£
ÐèҪʹÓÃÒ»¸öËã·¨µÄ²»Í¬±äÌå¡£ÀýÈ磬Äã¿ÉÄܻᶨÒåһЩ·´Ó³²»ÈݵĿռä/ʱ¼äȨºâµÄËã·¨¡£µ±ÕâЩ±äÌåʵ ......

java ÂÒÂë

1¡£Êý¾Ý¿â 
ÔÚ´´½¨µÄʱºò£¬Ö¸¶¨Æä±àÂëΪUTF-8. 
  £¨1£©oracle: 
SQL> select userenv('language') from dual; 
USERENV('LANGUAGE') 
--------------------------------------------- 
SIMPLIFIED CHINESE_CHINA.UTF8 
SQL> 
jdbc urlÎÞÐëÖ¸¶¨±àÂë¡£ 
& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ