欢迎访问悦橙教程(wld5.com),关注java教程。悦橙教程  java问答|  每日更新
页面导航 : > > 文章正文

Java唯一码生成,Java码生成,private stat

来源: javaer 分享于  点击 28802 次 点评:86

Java唯一码生成,Java码生成,private stat


private static String beforeBh;private static String beforeNum;

public static String codeGenerate() { Date now = new Date(); String behind = now.getTime()+""; if(beforeBh==null) { beforeBh = behind; } else if(beforeBh.equals(behind)) { behind = behind +beforeNum; beforeNum++; } else { beforeBh = behind; beforeNum = 0; } return behind;

相关栏目:

用户点评