java Ïß³Ìͬ²½
Java ÊÇÒ»ÃÅÖ§³Ö¶àÏ̵߳ĵÄÓïÑÔ£¬µ«ÔÚ´¦Àí¶àÏß³ÌʼþʱÎÒÃDZØÐë×¢ÒâÕâÑùÒ»¸öÎÊÌ⣺¶à¸öÏ߳̿ÉÄÜͬʱ¶Ôͬһ¶ÔÏóµÄÐ޸ġ£Èç¹ûÎÒÃDz»¼°Ê±×÷³ö´¦Àí£¬¿ÉÄÜÒýÆð¶ÔÏóÖµµÄ»ìÂÒ¡£Æäʵ´¦Àí°ì·¨Ò²ºÜ¼òµ¥£¬¾ÍÊǵ±Ò»¸öÏ̴߳¦ÀíÒ»¸ö¶ÔÏó£¬Ëøס¸Ã¶ÔÏó¡£
Ïà¹ØÎĵµ£º
/**
* °ÑÖ¸¶¨µÄÄÚÈÝдµ½Ö¸¶¨Â·¾¶µÄÎı¾ÎļþÉÏ
*
* @param pathÖ¸¶¨Â·¾¶
* @param context ҪдµÄÄÚÈÝ
*/
public static void writeFile(String path, String context) {
// ´Ó¿ØÖÆ̨ÊäÈëÄÚÈÝдÈëÎļþ
try {
FileWriter fw = new FileWriter(path, true);
PrintWriter pw = new Print ......
import java.io.*;
class BigInt
{
int a[];
int len;
BigInt(String str)
{
{
len=str.length();
a=new int[len];
for(int i=0;i<len;i++)
{
this.a[i]=str.charAt(i)-48;
}
&nb ......
ʹÓÃBigInteger´óÈÝÁ¿ÔËËãÀà¼ÆËã100µÄ½×³Ë
Ò».Ò»°ãËã·¨(Ñ»·)
public class Test {
public static void main(String[] args) {
int result = 1;
for (int i = 1; i <= 100; i++) {
result *= i;
}
System.out.println(result);
}
}
Êä³ö½á¹ûΪ0£¬ÒòΪintÎÞ·¨±£´æÏÂ100µÄ½×³ËµÄ½á¹û£¬100µ ......
Ôںܶàʱºò£¬ÎÒÃÇÐèÒª×Ô¶¯Éú³ÉÓÀÔ¶²»»áÖظ´µÄID£¬Òò´ËÎÒÃÇ»áÓõ½ÒÔϵĴúÂëÀ´ÊµÏÖ£º
×¢Ò⣺ÐèÒª¼ÓÈëÁ½¸öapacheµÄ°ü,´úÂëºÍ°üÇë´Óhttp://www.blogjava.net/afei0922/articles/129589.html ÏÂÔØ
package cn.com.cinda.rtx.state;
import org.apache.commons.id.Hex;
public class RandomCode {
pub ......