private static String getUserCode(int usercode){
int a = 0;
int b = 0;
if(usercode%26!=0){
a = usercode/26+65;
b = usercode%26+64;
}else{
a = usercode/26+64;
b = 90;
}
char co = (char)a;
char de = (char)b;
String str1 = String.valueOf(co);
String str2 = String.valueOf(de);
String str = str1+str2;
return str ;
}
原文:http://www.cnblogs.com/xvguang/p/5424672.html