java生成不重復(fù)序列號(hào) java如何生成12位序列號(hào)?
java如何生成12位序列號(hào)?Private static int maxvaluefive=9999999Private static int minvaluefive=0Private stati
java如何生成12位序列號(hào)?
Private static int maxvaluefive=9999999
Private static int minvaluefive=0
Private static atomicinteger atomic=new atomicinteger(minvaluefive)]/*]生成序列號(hào)*/
static string getseqfive(int coverpad){
for(){
int current=原子。獲?。ǎ?/p>
int newValue=current>=maxvaluefive?minvaluefive:當(dāng)前1
如果(原子比較數(shù)據(jù)集(current,newValue)){
返回StringUtils.leftPad文件( String.valueOf值(當(dāng)前),coverPad,Materials/tools:excel2016
1。首先,創(chuàng)建一個(gè)新的WPS表,其中包含序列號(hào)項(xiàng);
2。在序列號(hào)欄中輸入起始序列號(hào)“1”,并準(zhǔn)備生成序列號(hào)。當(dāng)然,你也可以從任何數(shù)字開始;
3。將鼠標(biāo)放在您輸入“1”的單元格右下角,當(dāng)使用真正的黑色加號(hào)時(shí)停止移動(dòng);
4。接下來(lái),單擊OK并按住鼠標(biāo)左鍵和下拉鼠標(biāo)。你可以看到下拉過(guò)程。鼠標(biāo)按下拉位置顯示序列號(hào);