package com.huatek.busi.common.util;

import java.util.Random;

public class GenerateUtil {

	/**
	 * @Title: generateCode 
	 * @Description: 随机数 
	 * @return String @throws
	 * 
	 */
	public static String generateCode(int length) {
		String ALLCHAR2 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		StringBuffer sb = new StringBuffer();
		Random random = new Random();
		for (int i = 0; i < length; i++) {
			sb.append(ALLCHAR2.charAt(random.nextInt(ALLCHAR2.length())));
		}
		return sb.toString();
	}
}
