关于java的一些公共步骤总结(不断更新)

关于java的一些公共方法总结(不断更新)工作总结,不说多,直接上代码public class UtilComAction {/** * 生

关于java的一些公共方法总结(不断更新)

工作总结,不说多,直接上代码

public class UtilComAction {/** * 生成随机数  */public static String generateRandMixed(int n)throws Exception{Random random = new Random();String[] randChars = {"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};    String result = "";    for(int i = 0; i < n ; i ++) {    int id = Math.abs(random.nextInt() % 35);    result += randChars[id];    }    return result;}}
?