//编程输出一个随机字母
public class s {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i = (int) (Math.random() * 2 + 1);// 生成1-2的随机数,并强转为整型
// A的ASCII码是65,a的ASCII码是97。
int j;
if (i == 1) {
j = (int) (Math.random() * 26 + 65);// 大写字母
} else {
j = (int) (Math.random() * 26 + 97);// 小写字母
}
System.out.println((char) (j));
}
}