BigInteger m =new BigInteger("1380000000");
BigInteger start=new BigInteger("1370000000");
BigInteger one=new BigInteger("1");
int msgid=0;
for(BigInteger n=start;n.compareTo(m)<0;n=n.add(one)){
msgid++;
}
System.out.println("所有數為"+msgid);
這是問題麼?還是你要demo代碼