¹ØÓÚjavaÖеÄÊýÖµ¼ÆËã
¼ÇµÃÔÚcsdnµÄij¸öÌû×ÓÖÐÌáµ½¼ÆËã½×³ËµÄÌÖÂÛ£¬µ±Ê±ÓкܶàÈ˶¼Ìá³öÁË×Ô¼ºµÄËã·¨£¬Ã¿¸öÈ˶¼ÏëµÄºÜÖÜÈ«¡£
ÕâÁ½ÌìÕýºÃ×Ô¼º¿´µ½ÁËÏà¹ØµÄÎÄÕ£¬ÄÇô×ܽáÕûÀíһϣ¬ÒÔ¹©´ó¼Ò²Î¿¼£¬Ò²ÎªÁË×Ô¼ºµÄ֪ʶ×ܽᡣ
ÔÚÊýѧÖУ¬Ö»ÓзǸºÕûÊý²ÅÓн׳ËÔËË㣬Òâ˼¾ÍÊÇ˵¸¡µãÊý¡¢¸ºÕûÊý¶¼²»ÄܽøÐмÆË㣬ÄÇôÎÒÃÇÔÚ¿¼ÂǼÆËãʱ£¬Ð¡ÓÚ0µÄÊý×ÖÎÒÃÇÊDz»¿¼ÂǼÆËãµÄ¡£ÔÚ¼ÆËã»úÖУ¬ÕûÊýµÄ×î´óÈ¡Öµ·¶Î§ÎªlongÐÍ£¬ÄÇô¼ÆËã½×³Ë×ÜÓлᳬ¹ý¼ÆËã»úÊýÖµÀàÐ͵ÄÓÐЧ·¶Î§¡£
Èç¹ûÎÒÃÇ¿¼ÂÇʹÓÃlong×÷Ϊ·µ»ØÀàÐÍ£¬ÄÇôÕâÊÇÓз¶Î§µÄ½×³ËÔËË㣬´úÂë¿ÉÒÔÈçÏ£º
//ÎҵIJÙ×÷ϵͳÊÇ32λµÄXP£¬¿ÉÒÔ¼ÆËã20ÒÔÄڵĽ׳Ë
//½×³Ë¼ÆËãµÄÊýÖµ±ØÐë´óÓÚµÈÓÚ0£¬Èç¹ûСÓÚ0²»¼ÆËã
//0µÄ½×³Ë¼ÆËãֵΪ1
if ( n < 0 || n > 20 ) { //½øÐз¶Î§¼ì²é
return -1;
} else if ( n == 0 ) {
return 1;
} else {
long result = 1;
for ( ; n > 0 ; n -- ) {
result *= n;
}
return result;
}
ÄÇôÈç¹û¼ÆËã´óµÄÊýÖµ½×³Ëʱ£¬ÔõôËãÄØ£¿
javaÖÐÌṩÁËÏàÓ¦µÄ´¦Àí°ì·¨£¬²ÉÓÃBigIntegerÀ´¼ÆË㣬´úÂëÈçÏÂ
if ( n < 0 ) {
return new BigInteger("-1");
} else if ( n == 0 ) {
return new BigInteger("1");
} else {
BigInteger result = new BigInteger("1");
for ( ; n > 0 ; n -- ) {
result = result.multiply(new BigInteger(new Integer(n).toString());
}
return result;
}
Ïà¹ØÎĵµ£º
а²×°ÁË JDK 6 µÄ³ÌÐòÔ±ÃÇÒ²Ðí»á·¢ÏÖ£¬³ýÁË´«Í³µÄ bin¡¢jre µÈĿ¼£¬JDK 6 ÐÂÔöÁËÒ»¸öÃûΪ db µÄĿ¼¡£Õâ±ãÊÇ Java 6 µÄгÉÔ±£ºJava DB¡£ÕâÊÇÒ»¸ö´¿ Java ʵÏÖ¡¢¿ªÔ´µÄÊý¾Ý¿â¹ÜÀíϵͳ£¨DBMS£©£¬Ô´ÓÚ Apache Èí¼þ»ù½ð»á£¨ASF£©ÃûϵÄÏîÄ¿ Derby¡£ËüÖ»ÓÐ 2MB ´óС£¬¶Ô±È¶¯éüÉÏ G µÄÊý¾Ý¿âÀ´Ëµ¿ÉνÐäÕä¡£µ«Õâ²¢²»·Á° Derby ......
java¶ÁÈ¡mp3Îļþ ÊÕ²Ø
JMFʵ¼ÊÉÏÊÇJavaµÄÒ»¸öÀà°ü¡£JMF 2.1.1¼¼ÊõÌṩÁËÏȽøµÄýÌå´¦ÀíÄÜÁ¦£¬´Ó¶øÀ©Õ¹ÁËJavaƽ̨µÄ¹¦ÄÜ¡£ÕâЩ¹¦ÄÜ°üÀ¨£ºÃ½Ì岶»ñ¡¢Ñ¹Ëõ¡¢Á÷ת¡¢»Ø·Å£¬ÒÔ¼°¶Ô¸÷ÖÖÖ÷ҪýÌåÐÎʽºÍ±àÂëµÄÖ§³Ö£¬ÈçM-JPEG¡¢H.263¡¢MP3¡¢RTP/RTSP (ʵʱ´«ËÍÐÒéºÍʵʱÁ÷תÐÒé)¡¢Macromedias Flash¡¢IBMµÄHotMediaºÍBeatniksµÄRi ......
·Ç³£¼òµ¥,ÔÚC#ÖÐÖ»ÐèÒªÔÚÀàµÄ·½·¨µÄÉÏ·½ÇÃÈýÏÂ"/"¾Í×Ô¶¯°ïÄãÌí¼ÓÏà¹ØµÄ´úÂë,ÄãÖ»Òª°´×ÅÌîд¾Í¿ÉÒÔÁË,¶øJavaÔòÊÇÊäÈë"/**",ËüÒ²»á×Ô¶¯ÐγÉÏà¹Ø´úÂë,¾ßÌå´úÂëÈçÏÂ:
C#
/// <summary>
/// ÔÚ´ËÌîд×ÜÌåÃèÊö
///</summary>
/// <param name="name">ÕâÀïÌîд²ÎÊýnameµÄÃèÊö</param>
public string ......
Date ---->String
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String date = sdf.fomat(new Date());
String ---->Date
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date date = sdf.parse("2010-03-16");
ÈÕÆڱȽϴóС£¬Õâ¾ÍÓõ½ÁËDateÀàÖеÄbefore()ºÍafter()·½· ......
Ò»£ºÀí½â¶àÏß³Ì
¶àÏß³ÌÊÇÕâÑùÒ»ÖÖ»úÖÆ£¬ËüÔÊÐíÔÚ³ÌÐòÖв¢·¢Ö´Ðжà¸öÖ¸ÁîÁ÷£¬Ã¿¸öÖ¸ÁîÁ÷¶¼³ÆΪһ¸öỊ̈߳¬±Ë´Ë¼ä»¥Ïà¶ÀÁ¢¡£
Ïß³ÌÓÖ³ÆΪÇáÁ¿¼¶½ø³Ì£¬ËüºÍ½ø³ÌÒ»ÑùÓµÓжÀÁ¢µÄÖ´ÐпØÖÆ£¬ÓɲÙ×÷ϵͳ¸ºÔðµ÷¶È£¬Çø±ðÔÚÓÚÏß³ÌûÓжÀÁ¢µÄ´æ´¢¿Õ¼ä£¬¶øÊǺÍËùÊô½ø³ÌÖеÄÆäËüÏ̹߳²ÏíÒ»¸ö´æ´¢¿Õ¼ä£¬ÕâʹµÃÏ̼߳äµÄͨÐÅÔ¶½Ï½ø³Ì¼òµ¥¡£
......